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. That should go with mentioning that _these_ _days_ kfree() can be paired with kmem_cache_alloc(). A reference to ae65a5211d90 "mm/slab: document kfree() as allowed for kmem_cache_alloc() objects" might be a good idea; at the very least it *must* come with "don't even think of backporting to any kernel that still has SLOB support (i.e. anything prior to 6.4)". Not sure if it's a good idea at this point - it doesn't look like it would get mixed into anything that might need backporting, but...