Re: [PATCH] scftorture: Handle NULL argument passed to scf_add_to_free_list().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 12, 2024 at 11:48:41AM -0800, Paul E. McKenney wrote:
> On Tue, Nov 12, 2024 at 07:30:03PM +0300, Dan Carpenter wrote:
> > On Tue, Nov 12, 2024 at 05:20:23PM +0100, Sebastian Andrzej Siewior wrote:
> > > Dan reported that after the rework the newly introduced
> > > scf_add_to_free_list() may get a NULL pointer passed. This replaced
> > > kfree() which was fine with a NULL pointer but scf_add_to_free_list()
> > > isn't.
> > > 
> > > Let scf_add_to_free_list() handle NULL pointer.
> > > 
> > > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > > Closes: https://lore.kernel.org/all/2375aa2c-3248-4ffa-b9b0-f0a24c50f237@stanley.mountain
> > > Fixes: 4788c861ad7e9 ("scftorture: Use a lock-less list to free memory.")
> > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> > > ---
> > > 
> > > Thank you Dan. I had to look twice, that `scfsp' above looked almost
> > > identical.
> 
> Queued and thank you both!
> 
> > Yeap...  Me too.  #LowHammingDistance
> 
> That could likely be improved, to be sure.  I am one of these strange
> people who wants the pointer to give a hint about its type, something
> about pointers to rcu_data, rcu_node, and rcu_state pointers all
> being messed with at the same time.
> 
> Maybe s/scfcp/scfchkp/?
> 

What about scf_chkp, maybe?

regards,
dan carpenter





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux