====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.0.1165/11938 is trying to acquire lock: ffff888063e38b80 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] ffff888063e38b80 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_xattr_set+0xbeb/0x13a0 fs/ocfs2/xattr.c:3855 but task is already holding lock: ffff8880619f3a98 (&oi->ip_xattr_sem){++++}-{4:4}, at: ocfs2_xattr_set+0x494/0x13a0 fs/ocfs2/xattr.c:3816 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&oi->ip_xattr_sem){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 ocfs2_init_acl+0x1c3/0x800 fs/ocfs2/acl.c:367 ocfs2_mknod+0x166a/0x2240 fs/ocfs2/namei.c:414 ocfs2_create+0x195/0x460 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:4503 [inline] open_last_lookups fs/namei.c:4602 [inline] path_openat+0x1347/0x3850 fs/namei.c:4854 do_file_open+0x23e/0x4a0 fs/namei.c:4886 do_sys_openat2+0x115/0x200 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_sys_openat fs/open.c:1390 [inline] __se_sys_openat fs/open.c:1385 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1385 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&journal->j_trans_barrier){.+.+}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 ocfs2_start_trans+0x3ac/0x700 fs/ocfs2/journal.c:369 ocfs2_shutdown_local_alloc+0x1ef/0xa50 fs/ocfs2/localalloc.c:417 ocfs2_dismount_volume+0x1e2/0x820 fs/ocfs2/super.c:1824 generic_shutdown_super+0x13d/0x2d0 fs/super.c:769 kill_block_super+0x44/0xa0 fs/super.c:1912 deactivate_locked_super+0xbc/0x110 fs/super.c:603 cleanup_mnt+0x3d3/0x460 fs/namespace.c:1317 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x1fa/0x730 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:339 [inline] do_syscall_64+0x33d/0x530 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (sb_internal#4){.+.+}-{0:0}: percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_intwrite include/linux/fs/super.h:177 [inline] ocfs2_start_trans+0x2ac/0x700 fs/ocfs2/journal.c:367 ocfs2_remove_btree_range+0x819/0x15f0 fs/ocfs2/alloc.c:5769 ocfs2_commit_truncate+0xc60/0x2560 fs/ocfs2/alloc.c:7383 ocfs2_truncate_for_delete fs/ocfs2/inode.c:735 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:902 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1191 [inline] ocfs2_evict_inode+0xf8f/0x4360 fs/ocfs2/inode.c:1333 evict+0x624/0xb50 fs/inode.c:822 d_delete_notify include/linux/fsnotify.h:381 [inline] vfs_rmdir+0x416/0x6b0 fs/namei.c:5388 filename_rmdir+0x292/0x520 fs/namei.c:5432 __do_sys_unlinkat fs/namei.c:5607 [inline] __se_sys_unlinkat+0x71/0x1a0 fs/namei.c:5600 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3181 [inline] check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x15ff/0x2e40 kernel/locking/lockdep.c:5254 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5906 down_write+0x3a/0x50 kernel/locking/rwsem.c:1631 inode_lock include/linux/fs.h:1024 [inline] ocfs2_xattr_set+0xbeb/0x13a0 fs/ocfs2/xattr.c:3855 __vfs_setxattr+0x442/0x480 fs/xattr.c:223 __vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257 vfs_setxattr+0x163/0x360 fs/xattr.c:344 do_setxattr fs/xattr.c:662 [inline] filename_setxattr+0x296/0x630 fs/xattr.c:690 path_setxattrat+0x408/0x450 fs/xattr.c:734 __do_sys_lsetxattr fs/xattr.c:775 [inline] __se_sys_lsetxattr fs/xattr.c:771 [inline] __x64_sys_lsetxattr+0xbf/0xe0 fs/xattr.c:771 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE] --> &journal->j_trans_barrier --> &oi->ip_xattr_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->ip_xattr_sem); lock(&journal->j_trans_barrier); lock(&oi->ip_xattr_sem); lock(&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]); *** DEADLOCK *** locks held by syz.0.1165/11938: 3, last CPU#0: #0: ffff88803893e510 (sb_writers#20){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494 #1: ffff8880619f3dc0 (&sb->s_type->i_mutex_key#30){++++}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] #1: ffff8880619f3dc0 (&sb->s_type->i_mutex_key#30){++++}-{4:4}, at: vfs_setxattr+0x13e/0x360 fs/xattr.c:343 #2: ffff8880619f3a98 (&oi->ip_xattr_sem){++++}-{4:4}, at: ocfs2_xattr_set+0x494/0x13a0 fs/ocfs2/xattr.c:3816 stack backtrace: CPU: 0 UID: 0 PID: 11938 Comm: syz.0.1165 Tainted: G L syzkaller #0 PREEMPT_{RT,(full)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/25/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2059 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2191 check_prev_add kernel/locking/lockdep.c:3181 [inline] check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x15ff/0x2e40 kernel/locking/lockdep.c:5254 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5906 down_write+0x3a/0x50 kernel/locking/rwsem.c:1631 inode_lock include/linux/fs.h:1024 [inline] ocfs2_xattr_set+0xbeb/0x13a0 fs/ocfs2/xattr.c:3855 __vfs_setxattr+0x442/0x480 fs/xattr.c:223 __vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257 vfs_setxattr+0x163/0x360 fs/xattr.c:344 do_setxattr fs/xattr.c:662 [inline] filename_setxattr+0x296/0x630 fs/xattr.c:690 path_setxattrat+0x408/0x450 fs/xattr.c:734 __do_sys_lsetxattr fs/xattr.c:775 [inline] __se_sys_lsetxattr fs/xattr.c:771 [inline] __x64_sys_lsetxattr+0xbf/0xe0 fs/xattr.c:771 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbb0b02de99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbb09265028 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007fbb0b2b6090 RCX: 00007fbb0b02de99 RDX: 0000200000000440 RSI: 0000200000000880 RDI: 0000200000000780 RBP: 00007fbb0b0c3eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbb0b2b6128 R14: 00007fbb0b2b6090 R15: 00007ffdf1b1cc38