mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+0d671007a95cd2835e05@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] WARNING: bad unlock balance in namespace_unlock
Date: Wed, 24 Sep 2025 18:41:00 +0800	[thread overview]
Message-ID: <tencent_97B86EC86EF2CC8B67CDC6C3D2D9C6754906@qq.com> (raw)
In-Reply-To: <68d3a9d3.a70a0220.4f78.0017.GAE@google.com>

#syz test

diff --git a/fs/namespace.c b/fs/namespace.c
index ac1aedafe05e..c22febeda1ac 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -4134,7 +4134,6 @@ struct mnt_namespace *copy_mnt_ns(u64 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) {
diff --git a/kernel/fork.c b/kernel/fork.c
index e9a7fb5c3e49..a0b8eeeb1d27 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2349,7 +2349,7 @@ __latent_entropy struct task_struct *copy_process(
 	if (need_futex_hash_allocate_default(clone_flags)) {
 		retval = futex_hash_allocate_default();
 		if (retval)
-			goto bad_fork_core_free;
+			goto bad_fork_cancel_cgroup;
 		/*
 		 * If we fail beyond this point we don't free the allocated
 		 * futex hash map. We assume that another thread will be created


  parent reply	other threads:[~2025-09-24 10:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24  8:20 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
2025-09-24 10:41 ` Edward Adam Davis [this message]
2025-09-24 11:45   ` [syzbot] [fs?] WARNING: bad unlock balance in namespace_unlock 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=tencent_97B86EC86EF2CC8B67CDC6C3D2D9C6754906@qq.com \
    --to=eadavis@qq.com \
    --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

all inboxes | Powered by JetHome®