REISERFS (device loop0): using 3.5.x disk format REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 6.6.0-rc7-next-20231027-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor301/5276 is trying to acquire lock: ffff888016a8a090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x78/0x100 fs/reiserfs/lock.c:27 but task is already holding lock: ffff88807dfdd720 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:124 [inline] ffff88807dfdd720 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x3b0 mm/util.c:544 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_lock){++++}-{3:3}: __might_fault mm/memory.c:5955 [inline] __might_fault+0x11b/0x190 mm/memory.c:5948 reiserfs_ioctl+0x1c4/0x2e0 fs/reiserfs/ioctl.c:96 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a -> #0 (&sbi->lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x2e22/0x5dc0 kernel/locking/lockdep.c:5136 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x530 kernel/locking/lockdep.c:5718 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x181/0x1330 kernel/locking/mutex.c:747 reiserfs_write_lock+0x78/0x100 fs/reiserfs/lock.c:27 reiserfs_dirty_inode+0xe6/0x270 fs/reiserfs/super.c:704 __mark_inode_dirty+0x1f0/0xd80 fs/fs-writeback.c:2452 generic_update_time+0xcf/0xf0 fs/inode.c:1941 inode_update_time fs/inode.c:1954 [inline] touch_atime+0x4eb/0x5d0 fs/inode.c:2026 file_accessed include/linux/fs.h:2360 [inline] generic_file_mmap+0x120/0x160 mm/filemap.c:3611 call_mmap include/linux/fs.h:2025 [inline] mmap_region+0x5e2/0x2820 mm/mmap.c:2851 do_mmap+0x890/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a7/0x3b0 mm/util.c:546 ksys_mmap_pgoff+0x421/0x5a0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_lock); lock(&sbi->lock); lock(&mm->mmap_lock); lock(&sbi->lock); *** DEADLOCK *** 2 locks held by syz-executor301/5276: #0: ffff88807dfdd720 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:124 [inline] #0: ffff88807dfdd720 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x3b0 mm/util.c:544 #1: ffff88801a7e4418 (sb_writers#10){.+.+}-{0:0}, at: file_accessed include/linux/fs.h:2360 [inline] #1: ffff88801a7e4418 (sb_writers#10){.+.+}-{0:0}, at: generic_file_mmap+0x120/0x160 mm/filemap.c:3611 stack backtrace: CPU: 0 PID: 5276 Comm: syz-executor301 Not tainted 6.6.0-rc7-next-20231027-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 check_noncircular+0x310/0x3f0 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:3868 [inline] __lock_acquire+0x2e22/0x5dc0 kernel/locking/lockdep.c:5136 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x530 kernel/locking/lockdep.c:5718 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x181/0x1330 kernel/locking/mutex.c:747 reiserfs_write_lock+0x78/0x100 fs/reiserfs/lock.c:27 reiserfs_dirty_inode+0xe6/0x270 fs/reiserfs/super.c:704 __mark_inode_dirty+0x1f0/0xd80 fs/fs-writeback.c:2452 generic_update_time+0xcf/0xf0 fs/inode.c:1941 inode_update_time fs/inode.c:1954 [inline] touch_atime+0x4eb/0x5d0 fs/inode.c:2026 file_accessed include/linux/fs.h:2360 [inline] generic_file_mmap+0x120/0x160 mm/filemap.c:3611 call_mmap include/linux/fs.h:2025 [inline] mmap_region+0x5e2/0x2820 mm/mmap.c:2851 do_mmap+0x890/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a7/0x3b0 mm/util.c:546 ksys_mmap_pgoff+0x421/0x5a0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a RIP: 0033:0x7f9e93251e99 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 01 1b 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc7e767a18 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9e93251e99 RDX: 0000000000000001 RSI: 0000000000003000 RDI: 0000000020000000 RBP: 0000000000000004 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000010012 R11: 0000000000000246 R12: 00007ffc7e767a70 R13: 00007ffc7e767ab0 R14: 0000000000400000 R15: 0000000000000003