ntfs3: loop0: ino=5, directory corrupted ============================================ WARNING: possible recursive locking detected 6.12.0-rc1-syzkaller-00042-gf23aa4c0761a #0 Not tainted -------------------------------------------- kworker/u4:3/41 is trying to acquire lock: ffff88803dfb0100 (&ni->ni_lock#2){+.+.}-{3:3}, at: ntfs_set_state+0x1ff/0x6c0 fs/ntfs3/fsntfs.c:947 but task is already holding lock: ffff88803dfb6f28 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1129 [inline] ffff88803dfb6f28 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_write_inode+0x1bc/0x1010 fs/ntfs3/frecord.c:3333 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock#2); lock(&ni->ni_lock#2); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by kworker/u4:3/41: #0: ffff88801c7aa148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff88801c7aa148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310 #1: ffffc900005bfd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc900005bfd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310 #2: ffff88803dfb6f28 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1129 [inline] #2: ffff88803dfb6f28 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_write_inode+0x1bc/0x1010 fs/ntfs3/frecord.c:3333 #3: ffff88803dfb67d0 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1129 [inline] #3: ffff88803dfb67d0 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_update_parent+0x9d2/0xdd0 fs/ntfs3/frecord.c:3298 stack backtrace: CPU: 0 UID: 0 PID: 41 Comm: kworker/u4:3 Not tainted 6.12.0-rc1-syzkaller-00042-gf23aa4c0761a #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 ntfs_set_state+0x1ff/0x6c0 fs/ntfs3/fsntfs.c:947 indx_read+0x5a7/0xc50 indx_find+0x47a/0xbf0 fs/ntfs3/index.c:1181 indx_update_dup+0x485/0x860 fs/ntfs3/index.c:2666 ni_update_parent+0xa18/0xdd0 fs/ntfs3/frecord.c:3301 ni_write_inode+0xd9a/0x1010 fs/ntfs3/frecord.c:3392 write_inode fs/fs-writeback.c:1503 [inline] __writeback_single_inode+0x711/0x10d0 fs/fs-writeback.c:1723 writeback_sb_inodes+0x80c/0x1370 fs/fs-writeback.c:1954 wb_writeback+0x41b/0xbd0 fs/fs-writeback.c:2134 wb_do_writeback fs/fs-writeback.c:2281 [inline] wb_workfn+0x410/0x1090 fs/fs-writeback.c:2321 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 ntfs3: loop0: Mark volume as dirty due to NTFS errors