====================================================== WARNING: possible circular locking dependency detected 6.6.0-rc1-next-20230915-syzkaller-05666-gdfa449a58323 #0 Not tainted ------------------------------------------------------ syz-executor.0/5401 is trying to acquire lock: ffff888075252ad0 (&lcnbmp_mrec_lock_key){+.+.}-{3:3}, at: map_mft_record+0x4a/0x730 fs/ntfs/mft.c:154 but task is already holding lock: ffff888079d109f8 (&vol->lcnbmp_lock){+.+.}-{3:3}, at: ntfs_put_super+0x3a0/0x1650 fs/ntfs/super.c:2290 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&vol->lcnbmp_lock){+.+.}-{3:3}: down_write+0x93/0x200 kernel/locking/rwsem.c:1573 __ntfs_cluster_free+0x12a/0xc20 fs/ntfs/lcnalloc.c:862 ntfs_cluster_free fs/ntfs/lcnalloc.h:96 [inline] ntfs_truncate+0x180a/0x2a50 fs/ntfs/inode.c:2695 ntfs_truncate_vfs fs/ntfs/inode.c:2863 [inline] ntfs_setattr+0x3dd/0x5b0 fs/ntfs/inode.c:2915 notify_change+0x742/0x11c0 fs/attr.c:539 do_truncate+0x15c/0x220 fs/open.c:66 handle_truncate fs/namei.c:3279 [inline] do_open fs/namei.c:3624 [inline] path_openat+0x23f1/0x29c0 fs/namei.c:3777 do_file_open_root+0x2df/0x5b0 fs/namei.c:3829 file_open_root+0x2a8/0x450 fs/open.c:1402 do_handle_open+0x3c5/0x5c0 fs/fhandle.c:239 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&lcnbmp_mrec_lock_key){+.+.}-{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+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747 map_mft_record+0x4a/0x730 fs/ntfs/mft.c:154 __ntfs_write_inode+0x90/0xc30 fs/ntfs/inode.c:2979 ntfs_commit_inode fs/ntfs/inode.h:300 [inline] ntfs_commit_inode fs/ntfs/inode.h:297 [inline] ntfs_put_super+0xefd/0x1650 fs/ntfs/super.c:2291 generic_shutdown_super+0x161/0x3c0 fs/super.c:696 kill_block_super+0x3b/0x70 fs/super.c:1649 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x3d0 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x215/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&vol->lcnbmp_lock); lock(&lcnbmp_mrec_lock_key); lock(&vol->lcnbmp_lock); lock(&lcnbmp_mrec_lock_key); *** DEADLOCK *** 2 locks held by syz-executor.0/5401: #0: ffff8880275640e0 (&type->s_umount_key#53){+.+.}-{3:3}, at: __super_lock fs/super.c:56 [inline] #0: ffff8880275640e0 (&type->s_umount_key#53){+.+.}-{3:3}, at: __super_lock_excl fs/super.c:71 [inline] #0: ffff8880275640e0 (&type->s_umount_key#53){+.+.}-{3:3}, at: deactivate_super+0xd6/0x100 fs/super.c:516 #1: ffff888079d109f8 (&vol->lcnbmp_lock){+.+.}-{3:3}, at: ntfs_put_super+0x3a0/0x1650 fs/ntfs/super.c:2290 stack backtrace: CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 6.6.0-rc1-next-20230915-syzkaller-05666-gdfa449a58323 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 check_noncircular+0x311/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+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747 map_mft_record+0x4a/0x730 fs/ntfs/mft.c:154 __ntfs_write_inode+0x90/0xc30 fs/ntfs/inode.c:2979 ntfs_commit_inode fs/ntfs/inode.h:300 [inline] ntfs_commit_inode fs/ntfs/inode.h:297 [inline] ntfs_put_super+0xefd/0x1650 fs/ntfs/super.c:2291 generic_shutdown_super+0x161/0x3c0 fs/super.c:696 kill_block_super+0x3b/0x70 fs/super.c:1649 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x3d0 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x215/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1ce3c7dc07 Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffcd938f698 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f1ce3c7dc07 RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffcd938f750 RBP: 00007ffcd938f750 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcd9390810 R13: 00007f1ce3cd7af2 R14: 000000000001b776 R15: 0000000000000003