mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhao Gongyi" <zhaogongyi@bytedance.com>
To: "Christian Brauner" <brauner@kernel.org>,
	 "Al Viro" <viro@zeniv.linux.org.uk>
Cc: <jack@suse.cz>, <jlayton@kernel.org>, <cel@kernel.org>,
	 <neil@brown.name>, <linux-fsdevel@vger.kernel.org>,
	 <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] vfs: keep the mount pinned while waiting for a parent delegation break
Date: Mon, 19 Oct 2026 14:37:25 +0800	[thread overview]
Message-ID: <13205cda-0ba8-4aca-b512-ce02526bcf07@bytedance.com> (raw)
In-Reply-To: <20261018-mehrpolig-goldschatz-medikament-3de24ee2cf35@brauner>

On 10/19/26 12:30 AM, Christian Brauner wrote:
> On Fri, Oct 16, 2026 at 07:38:45PM +0100, Al Viro wrote:
>>> So why not have it acquire an active superblock reference at the
>>> same time?  We don't need struct mount reference there - all it
>>> takes in increment of inode->i_sb->s_active on try_break_deleg()
>>> side and deactivate_super() on ->i_sb fetched *before* iput()
>>> of ->di_inode on the break_deleg_wait() side...
>>>
>>> No need to mess with every user of that thing...
> 
> Yeah, I like that a lot better than touching every caller. All the
> break_deleg_wait() callers wait in plain process context with the locks
> already dropped so deactivate_super() is fine there and the next caller
> can't get it wrong.
> 
> Please respin it that way. Mind the missing & on s_active in the sketch.
> 


Hi Al and Christian,

Thanks for the suggestion. I've respun the fix in the delegation
helpers. try_break_deleg() now takes an active superblock reference
when it retains the inode, and break_deleg_wait() drops it after
iput(). The atomic_inc() call uses &inode->i_sb->s_active, as
Christian noted.

I built the updated code with KASAN enabled and reran all five
reproducers on arm64 KVM. They completed without crashes or kernel
warnings, and stack samples confirmed the delegation wait paths
were exercised.

I'll send v2 separately.

Thanks,
Gongyi

      reply	other threads:[~2026-10-19  6:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  9:34 Zhao Gongyi
2026-10-16 18:29 ` Al Viro
2026-10-16 18:38   ` Al Viro
2026-10-18 16:30     ` Christian Brauner
2026-10-19  6:37       ` Zhao Gongyi [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=13205cda-0ba8-4aca-b512-ce02526bcf07@bytedance.com \
    --to=zhaogongyi@bytedance.com \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®