From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+80011ad33eec39e6ce42@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] WARNING: lock held when returning to user space in lock_next_vma
Date: Fri, 11 Jul 2025 10:25:57 +0800 [thread overview]
Message-ID: <20250711022558.3290-1-hdanton@sina.com> (raw)
In-Reply-To: <686d5adb.050a0220.1ffab7.0019.GAE@google.com>
> Date: Tue, 08 Jul 2025 10:52:27 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 26ffb3d6f02c Add linux-next specific files for 20250704
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=1719df70580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1e4f88512ae53408
> dashboard link: https://syzkaller.appspot.com/bug?extid=80011ad33eec39e6ce42
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1124abd4580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1099df70580000
#syz test
--- x/fs/proc/task_mmu.c
+++ y/fs/proc/task_mmu.c
@@ -586,6 +586,7 @@ no_vma:
return ERR_PTR(-ENOENT);
}
+static DEFINE_MUTEX(query_mutex);
static int do_procmap_query(struct proc_maps_private *priv, void __user *uarg)
{
struct procmap_query karg;
@@ -630,6 +631,7 @@ static int do_procmap_query(struct proc_
return -ENOMEM;
}
+ mutex_lock(&query_mutex);
err = query_vma_setup(priv);
if (err)
goto fail_vma_setup;
@@ -712,6 +714,7 @@ static int do_procmap_query(struct proc_
/* unlock vma or mmap_lock, and put mm_struct before copying data to user */
query_vma_teardown(priv);
+ mutex_unlock(&query_mutex);
mmput(mm);
if (karg.vma_name_size && copy_to_user(u64_to_user_ptr(karg.vma_name_addr),
@@ -733,6 +736,7 @@ static int do_procmap_query(struct proc_
out:
query_vma_teardown(priv);
fail_vma_setup:
+ mutex_unlock(&query_mutex);
mmput(mm);
kfree(name_buf);
return err;
--
next prev parent reply other threads:[~2025-07-11 2:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 17:52 syzbot
2025-07-08 22:19 ` Suren Baghdasaryan
2025-07-08 23:15 ` Liam R. Howlett
2025-07-08 23:51 ` Suren Baghdasaryan
2025-07-09 0:05 ` Suren Baghdasaryan
2025-07-09 10:26 ` Vlastimil Babka
2025-07-09 14:29 ` Suren Baghdasaryan
2025-07-09 1:54 ` syzbot
2025-07-11 0:32 ` Hillf Danton
2025-07-11 1:25 ` syzbot
2025-07-11 2:25 ` Hillf Danton [this message]
2025-07-11 2:30 ` syzbot
2025-07-11 3:54 ` Hillf Danton
2025-07-11 3:56 ` syzbot
2025-07-11 4:03 ` Hillf Danton
2025-07-11 4:28 ` syzbot
2025-07-11 5:09 ` Hillf Danton
2025-07-11 5:44 ` 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=20250711022558.3290-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+80011ad33eec39e6ce42@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®