[syzbot] [fs?] WARNING: lock held when returning to user space in query_matching_vma

From: syzbot
Date: Mon Jul 14 2025 - 13:11:07 EST


Hello,

syzbot found the following issue on:

HEAD commit: a62b7a37e6fc Add linux-next specific files for 20250711
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11e2ce8c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7d42120e19faaef
dashboard link: https://syzkaller.appspot.com/bug?extid=add57955be940be754a1
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=132750f0580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=167507d4580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/691b5f8ab5b1/disk-a62b7a37.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/47d1a209784d/vmlinux-a62b7a37.xz
kernel image: https://storage.googleapis.com/syzbot-assets/eb70d73c9e55/bzImage-a62b7a37.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+add57955be940be754a1@xxxxxxxxxxxxxxxxxxxxxxxxx

================================================
WARNING: lock held when returning to user space!
6.16.0-rc5-next-20250711-syzkaller #0 Not tainted
------------------------------------------------
syz.0.22/6099 is leaving the kernel with locks still held!
1 lock held by syz.0.22/6099:
#0: ffff888069d41588 (vm_lock){++++}-{0:0}, at: get_next_vma fs/proc/task_mmu.c:182 [inline]
#0: ffff888069d41588 (vm_lock){++++}-{0:0}, at: query_vma_find_by_addr fs/proc/task_mmu.c:512 [inline]
#0: ffff888069d41588 (vm_lock){++++}-{0:0}, at: query_matching_vma+0x319/0x5c0 fs/proc/task_mmu.c:544


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup