From: Al Viro <viro@zeniv.linux.org.uk>
To: Jan Kara <jack@suse.cz>
Cc: Edward Adam Davis <eadavis@qq.com>,
syzbot+0d671007a95cd2835e05@syzkaller.appspotmail.com,
brauner@kernel.org, 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: Wed, 24 Sep 2025 18:56:41 +0100 [thread overview]
Message-ID: <20250924175641.GT39973@ZenIV> (raw)
In-Reply-To: <mb2bpbjtvci4tywtg5brdjkfl3ylopde3j2ymppvmlapzwnwij@wykkbxztyw2f>
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;
next prev parent reply other threads:[~2025-09-24 17:56 UTC|newest]
Thread overview: 5+ 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 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 [this message]
2025-09-29 9:23 ` Christian Brauner
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=20250924175641.GT39973@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=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 \
/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).