ntfs3: loop1: ino=1b, "file0" attr_set_size ====================================================== WARNING: possible circular locking dependency detected 6.11.0-rc7-syzkaller-g5f5673607153 #0 Not tainted ------------------------------------------------------ syz.1.125/7180 is trying to acquire lock: ffff0000f3974318 (&ni->ni_lock#2){+.+.}-{3:3}, at: ntfs_set_state+0x1a4/0x5c0 fs/ntfs3/fsntfs.c:947 but task is already holding lock: ffff0000f39725b8 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline] ffff0000f39725b8 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_set_ea+0x1d4/0x1318 fs/ntfs3/xattr.c:336 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ni->ni_lock/4){+.+.}-{3:3}: __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline] mi_read+0x26c/0x4d8 fs/ntfs3/record.c:148 ntfs_read_mft fs/ntfs3/inode.c:70 [inline] ntfs_iget5+0x360/0x2bf8 fs/ntfs3/inode.c:537 ni_update_parent+0x6f0/0xac8 fs/ntfs3/frecord.c:3286 ni_write_inode+0xb64/0xda8 fs/ntfs3/frecord.c:3392 ntfs_sync_inode+0x2c/0x3c fs/ntfs3/inode.c:1057 ntfs_truncate fs/ntfs3/file.c:473 [inline] ntfs3_setattr+0x770/0x95c fs/ntfs3/file.c:775 notify_change+0x9f0/0xca0 fs/attr.c:503 do_truncate+0x1c0/0x28c fs/open.c:65 handle_truncate fs/namei.c:3381 [inline] do_open fs/namei.c:3731 [inline] path_openat+0x2388/0x29f8 fs/namei.c:3886 do_filp_open+0x1bc/0x3cc fs/namei.c:3913 do_sys_openat2+0x124/0x1b8 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_openat fs/open.c:1447 [inline] __se_sys_openat fs/open.c:1442 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1442 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 -> #0 (&ni->ni_lock#2){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x33d8/0x779c kernel/locking/lockdep.c:5142 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5759 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 ntfs_set_state+0x1a4/0x5c0 fs/ntfs3/fsntfs.c:947 ntfs_bad_inode+0x88/0x9c fs/ntfs3/fsntfs.c:911 attr_set_size+0x2858/0x3468 fs/ntfs3/attrib.c:869 ntfs_set_ea+0x6dc/0x1318 fs/ntfs3/xattr.c:462 ntfs_setxattr+0x150/0x6f8 fs/ntfs3/xattr.c:938 __vfs_setxattr+0x3d8/0x400 fs/xattr.c:200 __vfs_setxattr_noperm+0x110/0x578 fs/xattr.c:234 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295 vfs_setxattr+0x1a8/0x344 fs/xattr.c:321 do_setxattr fs/xattr.c:629 [inline] path_setxattr+0x30c/0x428 fs/xattr.c:658 __do_sys_setxattr fs/xattr.c:676 [inline] __se_sys_setxattr fs/xattr.c:672 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:672 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ni->ni_lock/4); lock(&ni->ni_lock#2); lock(&ni->ni_lock/4); lock(&ni->ni_lock#2); *** DEADLOCK *** 3 locks held by syz.1.125/7180: #0: ffff0000ce9ba420 (sb_writers#17){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:515 #1: ffff0000f3972850 (&type->i_mutex_dir_key#12){++++}-{3:3}, at: inode_lock include/linux/fs.h:800 [inline] #1: ffff0000f3972850 (&type->i_mutex_dir_key#12){++++}-{3:3}, at: vfs_setxattr+0x17c/0x344 fs/xattr.c:320 #2: ffff0000f39725b8 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline] #2: ffff0000f39725b8 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_set_ea+0x1d4/0x1318 fs/ntfs3/xattr.c:336 stack backtrace: CPU: 1 UID: 0 PID: 7180 Comm: syz.1.125 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119 dump_stack+0x1c/0x28 lib/dump_stack.c:128 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2059 check_noncircular+0x310/0x404 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 kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x33d8/0x779c kernel/locking/lockdep.c:5142 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5759 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 ntfs_set_state+0x1a4/0x5c0 fs/ntfs3/fsntfs.c:947 ntfs_bad_inode+0x88/0x9c fs/ntfs3/fsntfs.c:911 attr_set_size+0x2858/0x3468 fs/ntfs3/attrib.c:869 ntfs_set_ea+0x6dc/0x1318 fs/ntfs3/xattr.c:462 ntfs_setxattr+0x150/0x6f8 fs/ntfs3/xattr.c:938 __vfs_setxattr+0x3d8/0x400 fs/xattr.c:200 __vfs_setxattr_noperm+0x110/0x578 fs/xattr.c:234 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295 vfs_setxattr+0x1a8/0x344 fs/xattr.c:321 do_setxattr fs/xattr.c:629 [inline] path_setxattr+0x30c/0x428 fs/xattr.c:658 __do_sys_setxattr fs/xattr.c:676 [inline] __se_sys_setxattr fs/xattr.c:672 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:672 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 ntfs3: loop1: Mark volume as dirty due to NTFS errors ntfs3: Unknown parameter '0xffffffffffffffff"Co"'ή_0-%+ t6P'k;/|%T9i(%Z@G~ͱ\%S:UVTOvO7MfOJjN"Bn]XZ o*e4bL*'