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 syzkaller #0 Not tainted ------------------------------------------------------ syz.0.396/5903 is trying to acquire lock: ffff88801fac4090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27 but task is already holding lock: ffff88807bb84460 (sb_writers#14){.+.+}-{0:0}, at: file_accessed include/linux/fs.h:2522 [inline] ffff88807bb84460 (sb_writers#14){.+.+}-{0:0}, at: iterate_dir+0x482/0x560 fs/readdir.c:70 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sb_writers#14){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1811 [inline] sb_start_write+0x4f/0x1c0 include/linux/fs.h:1881 mnt_want_write_file+0x5c/0x200 fs/namespace.c:430 reiserfs_ioctl+0x10a/0x330 fs/reiserfs/ioctl.c:103 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&sbi->lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27 reiserfs_dirty_inode+0x10d/0x260 fs/reiserfs/super.c:704 __mark_inode_dirty+0x2c8/0xc90 fs/fs-writeback.c:2480 generic_update_time fs/inode.c:1881 [inline] inode_update_time fs/inode.c:1894 [inline] touch_atime+0x3b6/0x640 fs/inode.c:1966 file_accessed include/linux/fs.h:2522 [inline] iterate_dir+0x482/0x560 fs/readdir.c:70 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0xf2/0x270 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#14); lock(&sbi->lock); lock(sb_writers#14); lock(&sbi->lock); *** DEADLOCK *** 3 locks held by syz.0.396/5903: #0: ffff8880780e8af0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056 #1: ffff8880746f37e0 (&type->i_mutex_dir_key#11){++++}-{3:3}, at: iterate_dir+0x10d/0x560 fs/readdir.c:55 #2: ffff88807bb84460 (sb_writers#14){.+.+}-{0:0}, at: file_accessed include/linux/fs.h:2522 [inline] #2: ffff88807bb84460 (sb_writers#14){.+.+}-{0:0}, at: iterate_dir+0x482/0x560 fs/readdir.c:70 stack backtrace: CPU: 0 PID: 5903 Comm: syz.0.396 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27 reiserfs_dirty_inode+0x10d/0x260 fs/reiserfs/super.c:704 __mark_inode_dirty+0x2c8/0xc90 fs/fs-writeback.c:2480 generic_update_time fs/inode.c:1881 [inline] inode_update_time fs/inode.c:1894 [inline] touch_atime+0x3b6/0x640 fs/inode.c:1966 file_accessed include/linux/fs.h:2522 [inline] iterate_dir+0x482/0x560 fs/readdir.c:70 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0xf2/0x270 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fdf96fbbdd9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdf95215028 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fdf97234fa0 RCX: 00007fdf96fbbdd9 RDX: 000000000000004f RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fdf97051d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fdf97235038 R14: 00007fdf97234fa0 R15: 00007fff966c6da8