loop1: detected capacity change from 0 to 32768 ocfs2: Mounting device (7,1) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected 6.15.0-next-20250606-syzkaller #0 Not tainted ------------------------------------------------------ syz.1.1244/12989 is trying to acquire lock: ffff88804e169538 (&oi->ip_xattr_sem){++++}-{4:4}, at: ocfs2_calc_xattr_init+0x20a/0xd80 fs/ocfs2/xattr.c:627 but task is already holding lock: ffff888076ef2640 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline] ffff888076ef2640 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x15e/0x4640 fs/ocfs2/suballoc.c:788 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:867 [inline] ocfs2_remove_inode fs/ocfs2/inode.c:669 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:832 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1093 [inline] ocfs2_evict_inode+0x153d/0x40e0 fs/ocfs2/inode.c:1230 evict+0x504/0x9c0 fs/inode.c:810 ocfs2_dentry_iput+0x247/0x370 fs/ocfs2/dcache.c:407 __dentry_kill+0x209/0x660 fs/dcache.c:669 dput+0x19f/0x2b0 fs/dcache.c:911 do_renameat2+0x888/0xc50 fs/namei.c:5279 __do_sys_renameat2 fs/namei.c:5311 [inline] __se_sys_renameat2 fs/namei.c:5308 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5308 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:867 [inline] ocfs2_del_inode_from_orphan+0x134/0x740 fs/ocfs2/namei.c:2727 ocfs2_dio_end_io_write fs/ocfs2/aops.c:2303 [inline] ocfs2_dio_end_io+0x479/0x10f0 fs/ocfs2/aops.c:2401 dio_complete+0x258/0x790 fs/direct-io.c:281 __blockdev_direct_IO+0x2db6/0x33d0 fs/direct-io.c:1303 ocfs2_direct_IO+0x25f/0x2d0 fs/ocfs2/aops.c:2438 generic_file_direct_write+0x1db/0x3e0 mm/filemap.c:4046 __generic_file_write_iter+0x11d/0x230 mm/filemap.c:4215 ocfs2_file_write_iter+0x157a/0x1d10 fs/ocfs2/file.c:2469 iter_file_splice_write+0x937/0x1000 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1158 splice_direct_to_actor+0x5a5/0xcc0 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x181/0x270 fs/splice.c:1227 do_sendfile+0x4da/0x7e0 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1431 [inline] __se_sys_sendfile64+0x13e/0x190 fs/read_write.c:1417 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1577 ocfs2_try_remove_refcount_tree+0xb6/0x320 fs/ocfs2/refcounttree.c:932 ocfs2_xattr_set+0x595/0x11f0 fs/ocfs2/xattr.c:3669 __vfs_removexattr+0x42e/0x470 fs/xattr.c:518 __vfs_removexattr_locked+0x1ed/0x230 fs/xattr.c:553 vfs_removexattr+0x80/0x1b0 fs/xattr.c:575 ovl_do_removexattr fs/overlayfs/overlayfs.h:333 [inline] ovl_removexattr fs/overlayfs/overlayfs.h:341 [inline] ovl_make_workdir fs/overlayfs/super.c:747 [inline] ovl_get_workdir+0xcc2/0x1730 fs/overlayfs/super.c:827 ovl_fill_super+0x1386/0x35d0 fs/overlayfs/super.c:1406 vfs_get_super fs/super.c:1323 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1342 vfs_get_tree+0x8f/0x2b0 fs/super.c:1802 do_new_mount+0x24a/0xa40 fs/namespace.c:3874 do_mount fs/namespace.c:4211 [inline] __do_sys_mount fs/namespace.c:4422 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4399 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&oi->ip_xattr_sem){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_read+0x46/0x2e0 kernel/locking/rwsem.c:1524 ocfs2_calc_xattr_init+0x20a/0xd80 fs/ocfs2/xattr.c:627 ocfs2_mknod+0xc92/0x2050 fs/ocfs2/namei.c:330 ocfs2_create+0x1a5/0x440 fs/ocfs2/namei.c:673 vfs_create+0x24b/0x400 fs/namei.c:3405 do_mknodat+0x3c6/0x4d0 fs/namei.c:4285 __do_sys_mknod fs/namei.c:4318 [inline] __se_sys_mknod fs/namei.c:4316 [inline] __x64_sys_mknod+0x8c/0xa0 fs/namei.c:4316 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &oi->ip_xattr_sem --> &ocfs2_sysfile_lock_key[args->fi_sysfile_type] --> &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2); rlock(&oi->ip_xattr_sem); *** DEADLOCK *** 3 locks held by syz.1.1244/12989: #0: ffff888069c7c428 (sb_writers#20){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:557 #1: ffff88804e169800 (&type->i_mutex_dir_key#12/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:912 [inline] #1: ffff88804e169800 (&type->i_mutex_dir_key#12/1){+.+.}-{4:4}, at: filename_create+0x1f9/0x470 fs/namei.c:4139 #2: ffff888076ef2640 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline] #2: ffff888076ef2640 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x15e/0x4640 fs/ocfs2/suballoc.c:788 stack backtrace: CPU: 0 UID: 0 PID: 12989 Comm: syz.1.1244 Not tainted 6.15.0-next-20250606-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2046 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_read+0x46/0x2e0 kernel/locking/rwsem.c:1524 ocfs2_calc_xattr_init+0x20a/0xd80 fs/ocfs2/xattr.c:627 ocfs2_mknod+0xc92/0x2050 fs/ocfs2/namei.c:330 ocfs2_create+0x1a5/0x440 fs/ocfs2/namei.c:673 vfs_create+0x24b/0x400 fs/namei.c:3405 do_mknodat+0x3c6/0x4d0 fs/namei.c:4285 __do_sys_mknod fs/namei.c:4318 [inline] __se_sys_mknod fs/namei.c:4316 [inline] __x64_sys_mknod+0x8c/0xa0 fs/namei.c:4316 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb94a98e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb94b7a3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 00007fb94abb5fa0 RCX: 00007fb94a98e929 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00002000000048c0 RBP: 00007fb94aa10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb94abb5fa0 R15: 00007ffcf7c34718