Linux filesystem development
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: NeilBrown <neil@brown.name>
Cc: Kees Cook <kees@kernel.org>,
	Joel Granados <joel.granados@kernel.org>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] proc_sysctl: remove RCU annotations for accessing ->sysctl
Date: Fri, 13 Jun 2025 04:04:17 +0100	[thread overview]
Message-ID: <20250613030417.GG1647736@ZenIV> (raw)
In-Reply-To: <174978315268.608730.1330012617868311392@noble.neil.brown.name>

On Fri, Jun 13, 2025 at 12:52:32PM +1000, NeilBrown wrote:
> 
> The ->sysctl field of a procfs inode is only set when the inode is
> created, and when it is being evicted.  In both these cases there cannot
> be concurrent accesses and so using RCU_INIT_POINTER() and
> rcu_dereference() is misleading.

Wait a minute.  Why can't there be concurrent accesses?  ->evict_inode()
is *before* RCU delay, not after it.

Sure, you can't hit it from d_alloc_parallel(), but you very much can
in normal dcache lookup...

      reply	other threads:[~2025-06-13  3:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  2:52 [PATCH] proc_sysctl: remove RCU annotations for accessing ->sysctl NeilBrown
2025-06-13  3:04 ` Al Viro [this message]

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=20250613030417.GG1647736@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=joel.granados@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    /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