ntfs3(loop9): failed to convert "0080" to cp852 ====================================================== WARNING: possible circular locking dependency detected 6.12.0-rc6-next-20241106-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/9524 is trying to acquire lock: ffff88804f40c3c8 (&ni->file.run_lock#2){++++}-{4:4}, at: run_unpack_ex+0x55e/0x9e0 fs/ntfs3/run.c:1119 but task is already holding lock: ffff888021f62270 (&wnd->rw_lock){++++}-{4:4}, at: run_unpack_ex+0x47a/0x9e0 fs/ntfs3/run.c:1100 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&wnd->rw_lock){++++}-{4:4}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_write_nested+0xa2/0x220 kernel/locking/rwsem.c:1693 ntfs_look_for_free_space+0x100/0x690 fs/ntfs3/fsntfs.c:362 attr_allocate_clusters+0x1d6/0x990 fs/ntfs3/attrib.c:159 attr_set_size+0x2053/0x4300 fs/ntfs3/attrib.c:574 ntfs_extend_mft+0x188/0x4b0 fs/ntfs3/fsntfs.c:512 ntfs_look_free_mft+0x77c/0x10c0 fs/ntfs3/fsntfs.c:709 ntfs_create_inode+0x581/0x3760 fs/ntfs3/inode.c:1305 ntfs_mknod+0x3c/0x50 fs/ntfs3/namei.c:120 vfs_mknod+0x36d/0x3b0 fs/namei.c:4189 do_mknodat+0x3ec/0x5b0 __do_sys_mknod fs/namei.c:4272 [inline] __se_sys_mknod fs/namei.c:4270 [inline] __x64_sys_mknod+0x8c/0xa0 fs/namei.c:4270 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->file.run_lock#2){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_read+0xb1/0xa40 kernel/locking/rwsem.c:1524 run_unpack_ex+0x55e/0x9e0 fs/ntfs3/run.c:1119 ntfs_read_mft fs/ntfs3/inode.c:401 [inline] ntfs_iget5+0x1f9a/0x37b0 fs/ntfs3/inode.c:537 ntfs_dir_emit fs/ntfs3/dir.c:335 [inline] ntfs_read_hdr+0x700/0xb80 fs/ntfs3/dir.c:383 ntfs_readdir+0x91f/0xf00 fs/ntfs3/dir.c:494 iterate_dir+0x571/0x800 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e2/0x4b0 fs/readdir.c:389 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&wnd->rw_lock); lock(&ni->file.run_lock#2); lock(&wnd->rw_lock); rlock(&ni->file.run_lock#2); *** DEADLOCK *** 3 locks held by syz-executor/9524: #0: ffff888028fb77b8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1191 #1: ffff88805f43a850 (&type->i_mutex_dir_key#14){++++}-{4:4}, at: iterate_dir+0x20c/0x800 fs/readdir.c:101 #2: ffff888021f62270 (&wnd->rw_lock){++++}-{4:4}, at: run_unpack_ex+0x47a/0x9e0 fs/ntfs3/run.c:1100 stack backtrace: CPU: 1 UID: 0 PID: 9524 Comm: syz-executor Not tainted 6.12.0-rc6-next-20241106-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_read+0xb1/0xa40 kernel/locking/rwsem.c:1524 run_unpack_ex+0x55e/0x9e0 fs/ntfs3/run.c:1119 ntfs_read_mft fs/ntfs3/inode.c:401 [inline] ntfs_iget5+0x1f9a/0x37b0 fs/ntfs3/inode.c:537 ntfs_dir_emit fs/ntfs3/dir.c:335 [inline] ntfs_read_hdr+0x700/0xb80 fs/ntfs3/dir.c:383 ntfs_readdir+0x91f/0xf00 fs/ntfs3/dir.c:494 iterate_dir+0x571/0x800 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e2/0x4b0 fs/readdir.c:389 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 RIP: 0033:0x7fdc965b08b3 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 62 43 f8 ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 d8 RSP: 002b:00007ffe3a5c6b88 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055555e33c600 RCX: 00007fdc965b08b3 RDX: 0000000000008000 RSI: 000055555e33c600 RDI: 0000000000000005 RBP: 000055555e33c5d4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 000055555e33c5d0 R15: 00007ffe3a5c8e30 ntfs3(loop9): failed to convert name for inode 1e.