mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jan Kara <jack@suse.cz>, Edward Adam Davis <eadavis@qq.com>,
	 syzbot+0d671007a95cd2835e05@syzkaller.appspotmail.com,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH Next] copy_mnt_ns(): Remove unnecessary unlock
Date: Mon, 29 Sep 2025 11:23:09 +0200	[thread overview]
Message-ID: <20250929-wettmachen-gitarre-c5c25dcfd3bf@brauner> (raw)
In-Reply-To: <20250924175641.GT39973@ZenIV>

On Wed, Sep 24, 2025 at 06:56:41PM +0100, Al Viro wrote:
> On Wed, Sep 24, 2025 at 02:03:56PM +0200, Jan Kara wrote:
> > On Wed 24-09-25 18:29:04, Edward Adam Davis wrote:
> > > This code segment is already protected by guards, namespace_unlock()
> > > should not appear here.
> > > 
> > > Reported-by: syzbot+0d671007a95cd2835e05@syzkaller.appspotmail.com
> > > Closes: https://syzkaller.appspot.com/bug?extid=0d671007a95cd2835e05
> > > Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> > 
> > Indeed. Feel free to add:
> > 
> > Reviewed-by: Jan Kara <jack@suse.cz>
> 
> I wonder where does that line come from, though.  Mismerge somewhere?
> d7b7253a0adc "copy_mnt_ns(): use guards" includes this:
> 
> @@ -4185,13 +4186,11 @@ struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns,
>  	new = copy_tree(old, old->mnt.mnt_root, copy_flags);
>  	if (IS_ERR(new)) {
>  		emptied_ns = new_ns;
> -		namespace_unlock();
>  		return ERR_CAST(new);
>  	}
>  	if (user_ns != ns->user_ns) {
> -		lock_mount_hash();
> +		guard(mount_writer)();
>  		lock_mnt_tree(new);
> -		unlock_mount_hash();
>  	}
>  	new_ns->root = new;
>  

Fwiw, I just pulled next-20250926 and I don't see this bug. So I'm not
sure it's even a merge conflict or it was in an earlier -next version.

  reply	other threads:[~2025-09-29  9:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24  8:20 [syzbot] [fs?] WARNING: bad unlock balance in namespace_unlock syzbot
2025-09-24  9:05 ` Edward Adam Davis
2025-09-24 10:25   ` syzbot
2025-09-24 10:29 ` [PATCH Next] copy_mnt_ns(): Remove unnecessary unlock Edward Adam Davis
2025-09-24 12:03   ` Jan Kara
2025-09-24 17:56     ` Al Viro
2025-09-29  9:23       ` Christian Brauner [this message]
2025-09-24 10:41 ` [syzbot] [fs?] WARNING: bad unlock balance in namespace_unlock Edward Adam Davis
2025-09-24 11:45   ` syzbot

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=20250929-wettmachen-gitarre-c5c25dcfd3bf@brauner \
    --to=brauner@kernel.org \
    --cc=eadavis@qq.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+0d671007a95cd2835e05@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --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®