REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.1.600/8869 is trying to acquire lock: ffff888021766418 (sb_writers#24){.+.+}-{0:0}, at: mnt_want_write_file+0x63/0x200 fs/namespace.c:456 but task is already holding lock: ffff8880196c6090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sbi->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x129/0xcc0 kernel/locking/mutex.c:747 reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 reiserfs_lookup+0x151/0x520 fs/reiserfs/namei.c:364 lookup_one_qstr_excl+0x112/0x250 fs/namei.c:1617 filename_create+0x222/0x460 fs/namei.c:3891 do_mkdirat+0xa1/0x440 fs/namei.c:4136 __do_sys_mkdirat fs/namei.c:4159 [inline] __se_sys_mkdirat fs/namei.c:4157 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4157 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (&type->i_mutex_dir_key#18/1){+.+.}-{3:3}: down_write_nested+0x9e/0x1f0 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:839 [inline] filename_create+0x1f6/0x460 fs/namei.c:3890 do_mkdirat+0xa1/0x440 fs/namei.c:4136 __do_sys_mkdirat fs/namei.c:4159 [inline] __se_sys_mkdirat fs/namei.c:4157 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4157 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (sb_writers#24){.+.+}-{0:0}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1633 [inline] sb_start_write+0x4d/0x1c0 include/linux/fs.h:1708 mnt_want_write_file+0x63/0x200 fs/namespace.c:456 reiserfs_ioctl+0x112/0x2d0 fs/reiserfs/ioctl.c:103 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: sb_writers#24 --> &type->i_mutex_dir_key#18/1 --> &sbi->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->lock); lock(&type->i_mutex_dir_key#18/1); lock(&sbi->lock); rlock(sb_writers#24); *** DEADLOCK *** 1 lock held by syz.1.600/8869: #0: ffff8880196c6090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 stack backtrace: CPU: 0 PID: 8869 Comm: syz.1.600 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 check_noncircular+0x2bd/0x3c0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1633 [inline] sb_start_write+0x4d/0x1c0 include/linux/fs.h:1708 mnt_want_write_file+0x63/0x200 fs/namespace.c:456 reiserfs_ioctl+0x112/0x2d0 fs/reiserfs/ioctl.c:103 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f8a5418f749 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:00007f8a550d0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f8a543e5fa0 RCX: 00007f8a5418f749 RDX: 0000200000000080 RSI: 0000000040087602 RDI: 0000000000000005 RBP: 00007f8a54213f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8a543e6038 R14: 00007f8a543e5fa0 R15: 00007ffe786b9848