REISERFS (device loop0): Using r5 hash to sort names REISERFS (device loop0): using 3.5.x disk format REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 6.6.0-rc5-syzkaller-00055-g1c8b86a3799f #0 Not tainted ------------------------------------------------------ syz-executor275/5107 is trying to acquire lock: ffff888147674090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x5f/0xd0 fs/reiserfs/lock.c:78 but task is already holding lock: ffff88807230c020 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:857 [inline] ffff88807230c020 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: page_cache_ra_unbounded+0xf1/0x7c0 mm/readahead.c:225 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (mapping.invalidate_lock#3){.+.+}-{3:3}: down_read+0xb1/0xa40 kernel/locking/rwsem.c:1520 filemap_invalidate_lock_shared include/linux/fs.h:857 [inline] page_cache_ra_unbounded+0xf1/0x7c0 mm/readahead.c:225 do_sync_mmap_readahead+0x444/0x850 filemap_fault+0x7d3/0x1710 mm/filemap.c:3291 __do_fault+0x133/0x4e0 mm/memory.c:4204 do_shared_fault mm/memory.c:4635 [inline] do_fault mm/memory.c:4709 [inline] do_pte_missing mm/memory.c:3669 [inline] handle_pte_fault mm/memory.c:4978 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x21d9/0x62b0 mm/memory.c:5284 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2ac/0x860 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 __put_user_4+0x11/0x20 arch/x86/lib/putuser.S:87 reiserfs_ioctl+0x155/0x2f0 fs/reiserfs/ioctl.c:96 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xf8/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #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+0x39ff/0x7f70 kernel/locking/lockdep.c:5136 lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5753 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747 reiserfs_write_lock_nested+0x5f/0xd0 fs/reiserfs/lock.c:78 reiserfs_cond_resched fs/reiserfs/reiserfs.h:848 [inline] search_by_key+0xab3/0x4b60 fs/reiserfs/stree.c:712 search_for_position_by_key+0x10d/0x1010 fs/reiserfs/stree.c:874 _get_block_create_0+0x303/0x20b0 fs/reiserfs/inode.c:305 reiserfs_get_block+0x39f/0x5130 fs/reiserfs/inode.c:695 do_mpage_readpage+0x90c/0x1f80 fs/mpage.c:234 mpage_readahead+0x44f/0x920 fs/mpage.c:382 read_pages+0x183/0x830 mm/readahead.c:160 page_cache_ra_unbounded+0x68e/0x7c0 mm/readahead.c:269 do_sync_mmap_readahead+0x444/0x850 filemap_fault+0x7d3/0x1710 mm/filemap.c:3291 __do_fault+0x133/0x4e0 mm/memory.c:4204 do_shared_fault mm/memory.c:4635 [inline] do_fault mm/memory.c:4709 [inline] do_pte_missing mm/memory.c:3669 [inline] handle_pte_fault mm/memory.c:4978 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x21d9/0x62b0 mm/memory.c:5284 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2ac/0x860 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 __put_user_4+0x11/0x20 arch/x86/lib/putuser.S:87 reiserfs_ioctl+0x155/0x2f0 fs/reiserfs/ioctl.c:96 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xf8/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(mapping.invalidate_lock#3); lock(&sbi->lock); lock(mapping.invalidate_lock#3); lock(&sbi->lock); *** DEADLOCK *** 1 lock held by syz-executor275/5107: #0: ffff88807230c020 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:857 [inline] #0: ffff88807230c020 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: page_cache_ra_unbounded+0xf1/0x7c0 mm/readahead.c:225 stack backtrace: CPU: 1 PID: 5107 Comm: syz-executor275 Not tainted 6.6.0-rc5-syzkaller-00055-g1c8b86a3799f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 check_noncircular+0x375/0x4a0 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+0x39ff/0x7f70 kernel/locking/lockdep.c:5136 lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5753 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747 reiserfs_write_lock_nested+0x5f/0xd0 fs/reiserfs/lock.c:78 reiserfs_cond_resched fs/reiserfs/reiserfs.h:848 [inline] search_by_key+0xab3/0x4b60 fs/reiserfs/stree.c:712 search_for_position_by_key+0x10d/0x1010 fs/reiserfs/stree.c:874 _get_block_create_0+0x303/0x20b0 fs/reiserfs/inode.c:305 reiserfs_get_block+0x39f/0x5130 fs/reiserfs/inode.c:695 do_mpage_readpage+0x90c/0x1f80 fs/mpage.c:234 mpage_readahead+0x44f/0x920 fs/mpage.c:382 read_pages+0x183/0x830 mm/readahead.c:160 page_cache_ra_unbounded+0x68e/0x7c0 mm/readahead.c:269 do_sync_mmap_readahead+0x444/0x850 filemap_fault+0x7d3/0x1710 mm/filemap.c:3291 __do_fault+0x133/0x4e0 mm/memory.c:4204 do_shared_fault mm/memory.c:4635 [inline] do_fault mm/memory.c:4709 [inline] do_pte_missing mm/memory.c:3669 [inline] handle_pte_fault mm/memory.c:4978 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x21d9/0x62b0 mm/memory.c:5284 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2ac/0x860 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:__put_user_4+0x11/0x20 arch/x86/lib/putuser.S:89 Code: 01 ca c3 66 0f 1f 44 00 00 f3 0f 1e fa 0f 01 cb 66 89 01 31 c9 0f 01 ca c3 f3 0f 1e fa 48 89 cb 48 c1 fb 3f 48 09 d9 0f 01 cb <89> 01 31 c9 0f 01 ca c3 0f 1f 80 00 00 00 00 f3 0f 1e fa 0f 01 cb RSP: 0018:ffffc9000460feb0 EFLAGS: 00050206 RAX: 0000000000000002 RBX: 0000000000000000 RCX: 0000000020000000 RDX: 0000000000000001 RSI: ffffffff8b0ab620 RDI: ffffffff8b5982e0 RBP: 1ffff1100e4617ab R08: ffffffff8e9a322f R09: 1ffffffff1d34645 R10: dffffc0000000000 R11: fffffbfff1d34646 R12: ffff88801bf6e500 R13: ffff88807230c198 R14: ffff88807230bd58 R15: 0000000020000000 reiserfs_ioctl+0x155/0x2f0 fs/reiserfs/ioctl.c:96 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xf8/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f50bef2e169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 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:00007ffe09994398 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f50bef2e169 RDX: 0000000020000000 RSI: 0000000080087601 RDI: 0000000000000005 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe099943f0 R13: 00007ffe09994430 R14: 0000000000400000 R15: 0000000000000003 ---------------- Code disassembly (best guess): 0: 01 ca add %ecx,%edx 2: c3 ret 3: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 9: f3 0f 1e fa endbr64 d: 0f 01 cb stac 10: 66 89 01 mov %ax,(%rcx) 13: 31 c9 xor %ecx,%ecx 15: 0f 01 ca clac 18: c3 ret 19: f3 0f 1e fa endbr64 1d: 48 89 cb mov %rcx,%rbx 20: 48 c1 fb 3f sar $0x3f,%rbx 24: 48 09 d9 or %rbx,%rcx 27: 0f 01 cb stac * 2a: 89 01 mov %eax,(%rcx) <-- trapping instruction 2c: 31 c9 xor %ecx,%ecx 2e: 0f 01 ca clac 31: c3 ret 32: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 39: f3 0f 1e fa endbr64 3d: 0f 01 cb stac