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: Fix up ->is_seen() handling
Date: Fri, 13 Jun 2025 03:41:34 +0100 [thread overview]
Message-ID: <20250613024134.GF1647736@ZenIV> (raw)
In-Reply-To: <174978225309.608730.8864073362569294982@noble.neil.brown.name>
On Fri, Jun 13, 2025 at 12:37:33PM +1000, NeilBrown wrote:
> If two threads in the same namespace look up the same name at the same
> time (which previously didn't exist), they will both enter
> d_alloc_parallel() where neither will notice the other, so both will
> create and install d_in_lookup() dentries, and then both will call
> ->lookup, creating two identical inodes.
>
> I suspect that isn't fatal, but it does seem odd.
>
> Maybe proc_sys_compare should return 0 for d_in_lookup() (aka !inode)
> dentries, and then proc_sys_revalidate() can perform the is_seen test
> and return -EAGAIN if needed, and __lookup_slow() and others could
> interpret that as meaning to "goto again" without calling
> d_invalidate().
Umm... Not sure it's the best solution; let me think a bit. Just need
to finish going through the ported rpc_pipefs series for the final look
and posting it; should be about half an hour or so...
next prev parent reply other threads:[~2025-06-13 2:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 0:37 [PATCH] proc_sysctl: Fix up ->is_seen() handling NeilBrown
2025-06-13 1:54 ` Al Viro
2025-06-13 2:01 ` Al Viro
2025-06-13 2:18 ` NeilBrown
2025-06-13 2:37 ` NeilBrown
2025-06-13 2:41 ` Al Viro [this message]
2025-06-13 3:14 ` Al Viro
2025-06-16 8:37 ` [LTP] " kernel test robot
2025-06-16 8:37 ` kernel test robot
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=20250613024134.GF1647736@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.