====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/4900 is trying to acquire lock: ffff8880742d6400 (&rl->lock){++++}-{3:3}, at: ntfs_read_block fs/ntfs/aops.c:248 [inline] ffff8880742d6400 (&rl->lock){++++}-{3:3}, at: ntfs_read_folio+0x1446/0x2980 fs/ntfs/aops.c:436 but task is already holding lock: ffff8880742d3b50 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x4c/0x650 fs/ntfs/mft.c:154 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ni->mrec_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x120/0xaf0 kernel/locking/mutex.c:747 map_mft_record+0x4c/0x650 fs/ntfs/mft.c:154 ntfs_truncate+0x280/0x27c0 fs/ntfs/inode.c:2383 ntfs_truncate_vfs fs/ntfs/inode.c:2862 [inline] ntfs_setattr+0x2bc/0x3a0 fs/ntfs/inode.c:2914 notify_change+0xc74/0xf40 fs/attr.c:499 do_truncate+0x197/0x220 fs/open.c:65 vfs_truncate+0x262/0x2f0 fs/open.c:111 do_sys_truncate+0xdc/0x190 fs/open.c:134 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&rl->lock){++++}-{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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ntfs_read_block fs/ntfs/aops.c:248 [inline] ntfs_read_folio+0x1446/0x2980 fs/ntfs/aops.c:436 filemap_read_folio+0x160/0x760 mm/filemap.c:2490 do_read_cache_folio+0x2a0/0x760 mm/filemap.c:3659 do_read_cache_page+0x32/0x220 mm/filemap.c:3701 read_mapping_page include/linux/pagemap.h:793 [inline] ntfs_map_page fs/ntfs/aops.h:75 [inline] ntfs_sync_mft_mirror+0x232/0x1aa0 fs/ntfs/mft.c:480 write_mft_record_nolock+0x1403/0x18c0 fs/ntfs/mft.c:805 write_mft_record+0x136/0x300 fs/ntfs/mft.h:95 __ntfs_write_inode+0x724/0xbf0 fs/ntfs/inode.c:3050 ntfs_commit_inode fs/ntfs/inode.h:300 [inline] ntfs_put_super+0xee6/0x1070 fs/ntfs/super.c:2307 generic_shutdown_super+0x130/0x340 fs/super.c:501 kill_block_super+0x7c/0xe0 fs/super.c:1470 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x463/0x4f0 fs/namespace.c:1191 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ni->mrec_lock); lock(&rl->lock); lock(&ni->mrec_lock); lock(&rl->lock); *** DEADLOCK *** 2 locks held by syz-executor/4900: #0: ffff8880412a00e0 (&type->s_umount_key#57){+.+.}-{3:3}, at: deactivate_super+0xa0/0xd0 fs/super.c:362 #1: ffff8880742d3b50 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x4c/0x650 fs/ntfs/mft.c:154 stack backtrace: CPU: 0 PID: 4900 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 check_noncircular+0x274/0x310 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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ntfs_read_block fs/ntfs/aops.c:248 [inline] ntfs_read_folio+0x1446/0x2980 fs/ntfs/aops.c:436 filemap_read_folio+0x160/0x760 mm/filemap.c:2490 do_read_cache_folio+0x2a0/0x760 mm/filemap.c:3659 do_read_cache_page+0x32/0x220 mm/filemap.c:3701 read_mapping_page include/linux/pagemap.h:793 [inline] ntfs_map_page fs/ntfs/aops.h:75 [inline] ntfs_sync_mft_mirror+0x232/0x1aa0 fs/ntfs/mft.c:480 write_mft_record_nolock+0x1403/0x18c0 fs/ntfs/mft.c:805 write_mft_record+0x136/0x300 fs/ntfs/mft.h:95 __ntfs_write_inode+0x724/0xbf0 fs/ntfs/inode.c:3050 ntfs_commit_inode fs/ntfs/inode.h:300 [inline] ntfs_put_super+0xee6/0x1070 fs/ntfs/super.c:2307 generic_shutdown_super+0x130/0x340 fs/super.c:501 kill_block_super+0x7c/0xe0 fs/super.c:1470 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x463/0x4f0 fs/namespace.c:1191 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7faa5cd90a77 Code: Unable to access opcode bytes at 0x7faa5cd90a4d. RSP: 002b:00007fffb2675e38 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007faa5ce13d7d RCX: 00007faa5cd90a77 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fffb2675ef0 RBP: 00007fffb2675ef0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007fffb2676f80 R13: 00007faa5ce13d7d R14: 0000000000037872 R15: 00007fffb2676fc0