Re: [PATCH v2] locktorture: Fix NULL pointer when torture_type is invalid

From: Paul E. McKenney
Date: Tue Mar 08 2016 - 14:52:10 EST


On Tue, Mar 08, 2016 at 10:10:52AM +0800, Kefeng Wang wrote:
>
>
> On 2016/3/7 21:37, Paul E. McKenney wrote:
> > On Mon, Mar 07, 2016 at 03:02:05PM +0800, Kefeng Wang wrote:
> >>
> >>
> >> On 2016/3/7 13:40, Davidlohr Bueso wrote:
> >>> On Mon, 07 Mar 2016, Kefeng Wang wrote:
> >>>> On 2016/3/3 16:36, Davidlohr Bueso wrote:
> >>>
> >>>>> + /*
> >>>>> + * Indicates early cleanup, meaning that the test has not run,
> >>>>> + * such as when passing bogus args when loading the module. As
> >>>>> + * such, only perform the underlying torture-specific cleanups,
> >>>>> + * and avoid anything related to locktorture.
> >>>>> + */
> >>>>> + if (!cxt.lwsa)
> >>>>> + goto end;
> >>>>
> >>>> Sorry for the late response, the cxt.lrsa should be taken into account too.
> >>>
> >>> I am taking it into account, note that we kfree lwsa if lrsa fails memory
> >>> allocation. Of course we should be defensive, so go ahead and explicitly set
> >>> it to nil. v2 below, otherwise same patch.
> >>
> >> This one looks good, and tested on my board.
> >
> > Very good! May we add your Tested-by?
>
> Sure, please.

Thank you, Kefeng!

Davidlohr, I tried applying your patches and got conflicts. Could you
please port them to -rcu and send me clean versions?

Thanx, Paul