Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

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

 



On Mon, Jun 10, 2024 at 11:40:54PM +0200, Vlastimil Babka wrote:
> On 6/10/24 10:36 PM, Steven Rostedt wrote:
> > On Mon, 10 Jun 2024 08:46:42 -0700
> > "Paul E. McKenney" <paulmck@xxxxxxxxxx> wrote:
> > 
> >> > > index 7c29f4afc23d..338c52168e61 100644
> >> > > --- a/fs/tracefs/inode.c
> >> > > +++ b/fs/tracefs/inode.c
> >> > > @@ -53,14 +53,6 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb)
> >> > >  	return &ti->vfs_inode;
> >> > >  }
> >> > >  
> >> > > -static void tracefs_free_inode_rcu(struct rcu_head *rcu)
> >> > > -{
> >> > > -	struct tracefs_inode *ti;
> >> > > -
> >> > > -	ti = container_of(rcu, struct tracefs_inode, rcu);
> >> > > -	kmem_cache_free(tracefs_inode_cachep, ti);  
> >> > 
> >> > Does this work?
> >> > 
> >> > tracefs needs to be freed via the tracefs_inode_cachep. Does
> >> > kfree_rcu() handle specific frees for objects that were not allocated
> >> > via kmalloc()?  
> >> 
> >> A recent change to kfree() allows it to correctly handle memory allocated
> >> via kmem_cache_alloc().  News to me as of a few weeks ago.  ;-)
> > 
> > If that's the case then:
> > 
> > Acked-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> > 
> > Do we have a way to add a "Depends-on" tag so that anyone backporting this
> > will know that it requires the change to whatever allowed that to happen?
> 
> Looks like people use that tag, although no grep hits in Documentation, so
> Cc'ing workflows@ and Thorsten.
> 
> In this case it would be
> 
> Depends-on: c9929f0e344a ("mm/slob: remove CONFIG_SLOB")

Ick, no, use the documented way of handling this as described in the
stable kernel rules file.

thanks,

greg k-h




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux