REISERFS (device loop0): Using tea hash to sort names REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 6.1.132-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/1933 is trying to acquire lock: ffff88810c3002e0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] ffff88810c3002e0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: vfs_setxattr+0xbd/0x170 fs/xattr.c:308 but task is already holding lock: ffff88810866b448 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0xe/0x30 fs/namespace.c:393 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_writers#13){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1891 [inline] sb_start_write+0x34/0xd0 include/linux/fs.h:1966 mnt_want_write_file+0x12/0x60 fs/namespace.c:437 reiserfs_ioctl+0xaf/0x130 fs/reiserfs/ioctl.c:103 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0x6a/0xb0 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (&sbi->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x99/0x970 kernel/locking/mutex.c:747 reiserfs_write_lock+0x26/0x40 fs/reiserfs/lock.c:27 reiserfs_lookup+0x174/0x240 fs/reiserfs/namei.c:364 __lookup_slow+0x129/0x190 fs/namei.c:1690 lookup_one_len+0xad/0xe0 fs/namei.c:2740 reiserfs_lookup_privroot+0x2e/0x90 fs/reiserfs/xattr.c:973 reiserfs_fill_super+0xb45/0xc10 fs/reiserfs/super.c:2174 mount_bdev+0x15d/0x1b0 fs/super.c:1443 legacy_get_tree+0x25/0x50 fs/fs_context.c:632 vfs_get_tree+0x1c/0x80 fs/super.c:1573 do_new_mount+0x15a/0x370 fs/namespace.c:3056 do_mount fs/namespace.c:3399 [inline] __do_sys_mount fs/namespace.c:3607 [inline] __se_sys_mount+0x177/0x1e0 fs/namespace.c:3584 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x146d/0x2830 kernel/locking/lockdep.c:5049 lock_acquire+0xe3/0x270 kernel/locking/lockdep.c:5662 down_write+0x26/0xc0 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] vfs_setxattr+0xbd/0x170 fs/xattr.c:308 do_setxattr fs/xattr.c:594 [inline] setxattr+0x131/0x170 fs/xattr.c:617 path_setxattr+0xab/0x120 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __x64_sys_setxattr+0x22/0x30 fs/xattr.c:648 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: &type->i_mutex_dir_key#8 --> &sbi->lock --> sb_writers#13 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#13); lock(&sbi->lock); lock(sb_writers#13); lock(&type->i_mutex_dir_key#8); *** DEADLOCK *** 1 lock held by syz-executor.0/1933: #0: ffff88810866b448 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0xe/0x30 fs/namespace.c:393 stack backtrace: CPU: 1 PID: 1933 Comm: syz-executor.0 Not tainted 6.1.132-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x89/0xd7 lib/dump_stack.c:106 print_circular_bug+0x2c5/0x300 kernel/locking/lockdep.c:2048 check_noncircular+0x106/0x110 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x146d/0x2830 kernel/locking/lockdep.c:5049 lock_acquire+0xe3/0x270 kernel/locking/lockdep.c:5662 down_write+0x26/0xc0 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] vfs_setxattr+0xbd/0x170 fs/xattr.c:308 do_setxattr fs/xattr.c:594 [inline] setxattr+0x131/0x170 fs/xattr.c:617 path_setxattr+0xab/0x120 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __x64_sys_setxattr+0x22/0x30 fs/xattr.c:648 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f79fdc7dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f79fe9bb0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007f79fddabf80 RCX: 00007f79fdc7dda9 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000020000080 RBP: 00007f79fdcca47a R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f79fddabf80 R15: 00007ffd310afa08