Re: [PATCH] [RFC] fs: prefer kfree_rcu() in fasync_remove_entry()

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

 



On Fri, Feb 09, 2024 at 03:22:15PM +0100, Christian Brauner wrote:
> On Fri, Feb 09, 2024 at 03:52:19PM +0300, Dmitry Antipov wrote:
> > In 'fasync_remove_entry()', prefer 'kfree_rcu()' over 'call_rcu()' with dummy
> > 'fasync_free_rcu()' callback. This is mostly intended in attempt to fix weird
> > https://syzkaller.appspot.com/bug?id=6a64ad907e361e49e92d1c4c114128a1bda2ed7f,
> > where kmemleak may consider 'fa' as unreferenced during RCU grace period. See
> > https://lore.kernel.org/stable/20230930174657.800551-1-joel@xxxxxxxxxxxxxxxxx
> > as well. Comments are highly appreciated.
> > 
> > Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx>
> > ---
> 
> Yeah, according to commit ae65a5211d90 ("mm/slab: document kfree() as
> allowed for kmem_cache_alloc() objects") this is now guaranteed to work
> for kmem_cache_alloc() objects since slab is gone. So independent of
> syzbot this seems like a decent enough cleanup.

Sure, but we'd better make very sure that it does *NOT* get picked by any
-stable prior to 6.4.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux