====================================================== WARNING: possible circular locking dependency detected 6.11.0-rc5-syzkaller-00050-g3ec3f5fc4a91 #0 Not tainted ------------------------------------------------------ syz-executor360/5219 is trying to acquire lock: ffff888011bc8100 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline] ffff888011bc8100 (&ni->ni_lock/4){+.+.}-{3:3}, at: attr_data_get_block+0x463/0x2ff0 fs/ntfs3/attrib.c:917 but task is already holding lock: ffff888011bc8538 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:854 [inline] ffff888011bc8538 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: page_cache_ra_unbounded+0xf7/0x7f0 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}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 down_read+0xb1/0xa40 kernel/locking/rwsem.c:1526 filemap_invalidate_lock_shared include/linux/fs.h:854 [inline] page_cache_ra_unbounded+0xf7/0x7f0 mm/readahead.c:225 do_sync_mmap_readahead+0x49c/0x970 filemap_fault+0x828/0x1760 mm/filemap.c:3314 __do_fault+0x135/0x460 mm/memory.c:4655 do_shared_fault mm/memory.c:5121 [inline] do_fault mm/memory.c:5195 [inline] do_pte_missing mm/memory.c:3947 [inline] handle_pte_fault+0x1176/0x6fc0 mm/memory.c:5521 __handle_mm_fault mm/memory.c:5664 [inline] handle_mm_fault+0xf70/0x1880 mm/memory.c:5832 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x2b9/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:65 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline] _inline_copy_to_user include/linux/uaccess.h:181 [inline] _copy_to_user+0x86/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:209 [inline] ni_fiemap+0x5b4/0x1910 fs/ntfs3/frecord.c:2140 ntfs_fiemap+0x132/0x180 fs/ntfs3/file.c:1279 ioctl_fiemap fs/ioctl.c:220 [inline] do_vfs_ioctl+0x1c07/0x2e50 fs/ioctl.c:841 __do_sys_ioctl fs/ioctl.c:905 [inline] __se_sys_ioctl+0x81/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ni->ni_lock/4){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline] attr_data_get_block+0x463/0x2ff0 fs/ntfs3/attrib.c:917 ntfs_get_block_vbo+0x3e4/0xd50 fs/ntfs3/inode.c:598 do_mpage_readpage+0x827/0x1c80 fs/mpage.c:225 mpage_readahead+0x44f/0x930 fs/mpage.c:374 read_pages+0x17e/0x840 mm/readahead.c:160 page_cache_ra_unbounded+0x6ce/0x7f0 mm/readahead.c:273 do_sync_mmap_readahead+0x49c/0x970 filemap_fault+0x828/0x1760 mm/filemap.c:3314 __do_fault+0x135/0x460 mm/memory.c:4655 do_shared_fault mm/memory.c:5121 [inline] do_fault mm/memory.c:5195 [inline] do_pte_missing mm/memory.c:3947 [inline] handle_pte_fault+0x1176/0x6fc0 mm/memory.c:5521 __handle_mm_fault mm/memory.c:5664 [inline] handle_mm_fault+0xf70/0x1880 mm/memory.c:5832 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(mapping.invalidate_lock#3); lock(&ni->ni_lock/4); lock(mapping.invalidate_lock#3); lock(&ni->ni_lock/4); *** DEADLOCK *** 1 lock held by syz-executor360/5219: #0: ffff888011bc8538 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:854 [inline] #0: ffff888011bc8538 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: page_cache_ra_unbounded+0xf7/0x7f0 mm/readahead.c:225 stack backtrace: CPU: 0 UID: 0 PID: 5219 Comm: syz-executor360 Not tainted 6.11.0-rc5-syzkaller-00050-g3ec3f5fc4a91 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2186 check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline] attr_data_get_block+0x463/0x2ff0 fs/ntfs3/attrib.c:917 ntfs_get_block_vbo+0x3e4/0xd50 fs/ntfs3/inode.c:598 do_mpage_readpage+0x827/0x1c80 fs/mpage.c:225 mpage_readahead+0x44f/0x930 fs/mpage.c:374 read_pages+0x17e/0x840 mm/readahead.c:160 page_cache_ra_unbounded+0x6ce/0x7f0 mm/readahead.c:273 do_sync_mmap_readahead+0x49c/0x970 filemap_fault+0x828/0x1760 mm/filemap.c:3314 __do_fault+0x135/0x460 mm/memory.c:4655 do_shared_fault mm/memory.c:5121 [inline] do_fault mm/memory.c:5195 [inline] do_pte_missing mm/memory.c:3947 [inline] handle_pte_fault+0x1176/0x6fc0 mm/memory.c:5521 __handle_mm_fault mm/memory.c:5664 [inline] handle_mm_fault+0xf70/0x1880 mm/memory.c:5832 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7fe662d64051 Code: 84 e4 fd ff ff 48 89 05 ed c0 0d 00 e9 d8 fd ff ff 0f 1f 84 00 00 00 00 00 ba 73 00 00 00 be 40 00 00 20 bf 55 00 00 00 31 c0 <66> 89 14 25 44 00 00 20 31 d2 c7 04 25 40 00 00 20 2e 2f 62 75 e8 RSP: 002b:00007fe662d30220 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00007fe662e42718 RCX: 00007fe662d750d6 RDX: 0000000000000073 RSI: 0000000020000040 RDI: 0000000000000055 RBP: 00007fe662e42710 R08: 0000000000000000 R09: 00007fff7a790aa7 R10: 0000000000000008 R11: 0000000000000246 R12: 00007fe662e4271c R13: 00007fe662e0e860 R14: 00007fe662def0e0 R15: 00007fe662def07e