From: Christian Brauner <brauner@kernel.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Joel Fernandes <joel@joelfernandes.org>,
linux-fsdevel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] [RFC] fs: prefer kfree_rcu() in fasync_remove_entry()
Date: Fri, 9 Feb 2024 15:22:15 +0100 [thread overview]
Message-ID: <20240209-hierzu-getrunken-0b1a3bfc7d16@brauner> (raw)
In-Reply-To: <20240209125220.330383-1-dmantipov@yandex.ru>
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@joelfernandes.org
> as well. Comments are highly appreciated.
>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
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.
next prev parent reply other threads:[~2024-02-09 14:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 12:52 [PATCH] [RFC] fs: prefer kfree_rcu() in fasync_remove_entry() Dmitry Antipov
2024-02-09 14:21 ` Christian Brauner
2024-02-09 14:22 ` Christian Brauner [this message]
2024-02-09 16:36 ` Al Viro
2024-02-12 9:59 ` Christian Brauner
2024-02-09 16:35 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240209-hierzu-getrunken-0b1a3bfc7d16@brauner \
--to=brauner@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dmantipov@yandex.ru \
--cc=joel@joelfernandes.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).