* [syzbot] [fs?] possible deadlock in put_mnt_ns
@ 2026-01-15 9:50 syzbot
2026-01-16 10:40 ` Christian Brauner
0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2026-01-15 9:50 UTC (permalink / raw)
To: brauner, jack, linux-fsdevel, linux-kernel, syzkaller-bugs, viro
Hello,
syzbot found the following issue on:
HEAD commit: 0f853ca2a798 Add linux-next specific files for 20260113
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1386f99a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=789b351b8a4cafe1
dashboard link: https://syzkaller.appspot.com/bug?extid=55fd613012e606d75d45
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1482859a580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13402052580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9c7778b6d6be/disk-0f853ca2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea278b0d6aff/vmlinux-0f853ca2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/60b94236c918/bzImage-0f853ca2.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+55fd613012e606d75d45@syzkaller.appspotmail.com
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fca229e5fa0 R14: 00007fca229e5fa0 R15: 0000000000000003
</TASK>
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.23/6026 is trying to acquire lock:
ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: class_namespace_excl_constructor fs/namespace.c:101 [inline]
ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: put_mnt_ns+0x170/0x2f0 fs/namespace.c:6241
but task is already holding lock:
ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: lock_mount_exact+0x89/0x630 fs/namespace.c:3852
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(namespace_sem);
lock(namespace_sem);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by syz.0.23/6026:
#0: ffff888149040148 (&sb->s_type->i_mutex_key){++++}-{4:4}, at: inode_lock include/linux/fs.h:1028 [inline]
#0: ffff888149040148 (&sb->s_type->i_mutex_key){++++}-{4:4}, at: lock_mount_exact+0x7d/0x630 fs/namespace.c:3851
#1: ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
#1: ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: lock_mount_exact+0x89/0x630 fs/namespace.c:3852
stack backtrace:
CPU: 1 UID: 0 PID: 6026 Comm: syz.0.23 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041
check_deadlock kernel/locking/lockdep.c:3093 [inline]
validate_chain kernel/locking/lockdep.c:3895 [inline]
__lock_acquire+0x2540/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x107/0x340 kernel/locking/lockdep.c:5868
down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590
namespace_lock fs/namespace.c:1730 [inline]
class_namespace_excl_constructor fs/namespace.c:101 [inline]
put_mnt_ns+0x170/0x2f0 fs/namespace.c:6241
prepare_anon_dentry fs/libfs.c:2167 [inline]
path_from_stashed+0x40a/0x5c0 fs/libfs.c:2252
open_namespace_file+0x8f/0x130 fs/nsfs.c:108
open_new_namespace fs/namespace.c:3174 [inline]
vfs_open_tree+0xa9d/0xf50 fs/namespace.c:3220
__do_sys_open_tree fs/namespace.c:3230 [inline]
__se_sys_open_tree fs/namespace.c:3228 [inline]
__x64_sys_open_tree+0x96/0x110 fs/namespace.c:3228
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fca2278f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc7a04e728 EFLAGS: 00000246 ORIG_RAX: 00000000000001ac
RAX: ffffffffffffffda RBX: 00007fca229e5fa0 RCX: 00007fca2278f749
RDX: 0000000000001802 RSI: 0000200000000000 RDI: ffffffffffffffff
RBP: 00007ffc7a04e780 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fca229e5fa0 R14: 00007fca229e5fa0 R15: 0000000000000003
</TASK>
---
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@googlegroups.com.
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [syzbot] [fs?] possible deadlock in put_mnt_ns
2026-01-15 9:50 [syzbot] [fs?] possible deadlock in put_mnt_ns syzbot
@ 2026-01-16 10:40 ` Christian Brauner
2026-01-16 10:52 ` Christian Brauner
0 siblings, 1 reply; 4+ messages in thread
From: Christian Brauner @ 2026-01-16 10:40 UTC (permalink / raw)
To: syzbot; +Cc: jack, linux-fsdevel, linux-kernel, syzkaller-bugs, viro
On Thu, Jan 15, 2026 at 01:50:24AM -0800, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 0f853ca2a798 Add linux-next specific files for 20260113
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=1386f99a580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=789b351b8a4cafe1
> dashboard link: https://syzkaller.appspot.com/bug?extid=55fd613012e606d75d45
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1482859a580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13402052580000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/9c7778b6d6be/disk-0f853ca2.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/ea278b0d6aff/vmlinux-0f853ca2.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/60b94236c918/bzImage-0f853ca2.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+55fd613012e606d75d45@syzkaller.appspotmail.com
>
> R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
> R13: 00007fca229e5fa0 R14: 00007fca229e5fa0 R15: 0000000000000003
> </TASK>
> ============================================
> WARNING: possible recursive locking detected
> syzkaller #0 Not tainted
> --------------------------------------------
> syz.0.23/6026 is trying to acquire lock:
> ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
> ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: class_namespace_excl_constructor fs/namespace.c:101 [inline]
> ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: put_mnt_ns+0x170/0x2f0 fs/namespace.c:6241
>
> but task is already holding lock:
> ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
> ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: lock_mount_exact+0x89/0x630 fs/namespace.c:3852
>
> other info that might help us debug this:
> Possible unsafe locking scenario:
>
> CPU0
> ----
> lock(namespace_sem);
> lock(namespace_sem);
Groan, simple fix. opening nsfs fd must be done outside of the lock as
it would drop the mntns reference. Fixing.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [syzbot] [fs?] possible deadlock in put_mnt_ns
2026-01-16 10:40 ` Christian Brauner
@ 2026-01-16 10:52 ` Christian Brauner
2026-01-16 13:44 ` syzbot
0 siblings, 1 reply; 4+ messages in thread
From: Christian Brauner @ 2026-01-16 10:52 UTC (permalink / raw)
To: syzbot; +Cc: jack, linux-fsdevel, linux-kernel, syzkaller-bugs, viro
On Fri, Jan 16, 2026 at 11:40:06AM +0100, Christian Brauner wrote:
> On Thu, Jan 15, 2026 at 01:50:24AM -0800, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 0f853ca2a798 Add linux-next specific files for 20260113
> > git tree: linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1386f99a580000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=789b351b8a4cafe1
> > dashboard link: https://syzkaller.appspot.com/bug?extid=55fd613012e606d75d45
> > compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1482859a580000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13402052580000
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/9c7778b6d6be/disk-0f853ca2.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/ea278b0d6aff/vmlinux-0f853ca2.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/60b94236c918/bzImage-0f853ca2.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+55fd613012e606d75d45@syzkaller.appspotmail.com
> >
> > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
> > R13: 00007fca229e5fa0 R14: 00007fca229e5fa0 R15: 0000000000000003
> > </TASK>
> > ============================================
> > WARNING: possible recursive locking detected
> > syzkaller #0 Not tainted
> > --------------------------------------------
> > syz.0.23/6026 is trying to acquire lock:
> > ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
> > ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: class_namespace_excl_constructor fs/namespace.c:101 [inline]
> > ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: put_mnt_ns+0x170/0x2f0 fs/namespace.c:6241
> >
> > but task is already holding lock:
> > ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: namespace_lock fs/namespace.c:1730 [inline]
> > ffffffff8e49efd0 (namespace_sem){++++}-{4:4}, at: lock_mount_exact+0x89/0x630 fs/namespace.c:3852
> >
> > other info that might help us debug this:
> > Possible unsafe locking scenario:
> >
> > CPU0
> > ----
> > lock(namespace_sem);
> > lock(namespace_sem);
>
> Groan, simple fix. opening nsfs fd must be done outside of the lock as
> it would drop the mntns reference. Fixing.
#syz test: https://github.com/brauner/linux.git vfs-7.0.namespace
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-16 13:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 9:50 [syzbot] [fs?] possible deadlock in put_mnt_ns syzbot
2026-01-16 10:40 ` Christian Brauner
2026-01-16 10:52 ` Christian Brauner
2026-01-16 13:44 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox