====================================================== WARNING: possible circular locking dependency detected 6.16.0-syzkaller-11699-g7e161a991ea7 #0 Not tainted ------------------------------------------------------ syz-executor/12718 is trying to acquire lock: ffff888053ff1800 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] ffff888053ff1800 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_remove_inode fs/ocfs2/inode.c:731 [inline] ffff888053ff1800 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_wipe_inode fs/ocfs2/inode.c:894 [inline] ffff888053ff1800 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_delete_inode fs/ocfs2/inode.c:1155 [inline] ffff888053ff1800 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_evict_inode+0x153d/0x40e0 fs/ocfs2/inode.c:1292 but task is already holding lock: ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_wipe_inode fs/ocfs2/inode.c:852 [inline] ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_delete_inode fs/ocfs2/inode.c:1155 [inline] ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_evict_inode+0xf86/0x40e0 fs/ocfs2/inode.c:1292 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 inode_lock include/linux/fs.h:869 [inline] ocfs2_del_inode_from_orphan+0x134/0x740 fs/ocfs2/namei.c:2730 ocfs2_dio_end_io_write fs/ocfs2/aops.c:2306 [inline] ocfs2_dio_end_io+0x479/0x10f0 fs/ocfs2/aops.c:2404 dio_complete+0x25b/0x790 fs/direct-io.c:281 __blockdev_direct_IO+0x2e63/0x3490 fs/direct-io.c:1303 ocfs2_direct_IO+0x25f/0x2d0 fs/ocfs2/aops.c:2441 generic_file_direct_write+0x1db/0x3e0 mm/filemap.c:4109 __generic_file_write_iter+0x11d/0x230 mm/filemap.c:4278 ocfs2_file_write_iter+0x157a/0x1d10 fs/ocfs2/file.c:2469 iter_file_splice_write+0x93a/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+0x5a8/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 -> #2 (&ocfs2_quota_ip_alloc_sem_key){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 ocfs2_create_local_dquot+0x19d/0x1a40 fs/ocfs2/quota_local.c:1227 ocfs2_acquire_dquot+0x80f/0xb30 fs/ocfs2/quota_global.c:883 dqget+0x7b1/0xf10 fs/quota/dquot.c:977 __dquot_initialize+0x3b3/0xcb0 fs/quota/dquot.c:1505 ocfs2_get_init_inode+0x13b/0x1b0 fs/ocfs2/namei.c:205 ocfs2_mknod+0x863/0x2050 fs/ocfs2/namei.c:313 ocfs2_mkdir+0x191/0x440 fs/ocfs2/namei.c:659 vfs_mkdir+0x306/0x510 fs/namei.c:4366 do_mkdirat+0x247/0x590 fs/namei.c:4399 __do_sys_mkdirat fs/namei.c:4416 [inline] __se_sys_mkdirat fs/namei.c:4414 [inline] __x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4414 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 (&dquot->dq_lock){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:598 [inline] __mutex_lock+0x187/0x1360 kernel/locking/mutex.c:760 wait_on_dquot fs/quota/dquot.c:354 [inline] dqget+0x72a/0xf10 fs/quota/dquot.c:972 __dquot_initialize+0x3b3/0xcb0 fs/quota/dquot.c:1505 ocfs2_get_init_inode+0x13b/0x1b0 fs/ocfs2/namei.c:205 ocfs2_mknod+0x863/0x2050 fs/ocfs2/namei.c:313 ocfs2_mkdir+0x191/0x440 fs/ocfs2/namei.c:659 vfs_mkdir+0x306/0x510 fs/namei.c:4366 do_mkdirat+0x247/0x590 fs/namei.c:4399 __do_sys_mkdirat fs/namei.c:4416 [inline] __se_sys_mkdirat fs/namei.c:4414 [inline] __x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4414 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 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 inode_lock include/linux/fs.h:869 [inline] ocfs2_remove_inode fs/ocfs2/inode.c:731 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:894 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1155 [inline] ocfs2_evict_inode+0x153d/0x40e0 fs/ocfs2/inode.c:1292 evict+0x504/0x9c0 fs/inode.c:810 do_unlinkat+0x39f/0x560 fs/namei.c:4657 __do_sys_unlink fs/namei.c:4696 [inline] __se_sys_unlink fs/namei.c:4694 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4694 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: &ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE] --> &ocfs2_quota_ip_alloc_sem_key --> &ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE] Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]); lock(&ocfs2_quota_ip_alloc_sem_key); lock(&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]); lock(&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]); *** DEADLOCK *** 3 locks held by syz-executor/12718: #0: ffff888054316428 (sb_writers#14){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:557 #1: ffff888032650bd0 (&osb->nfs_sync_rwlock){++++}-{4:4}, at: ocfs2_nfs_sync_lock+0x106/0x250 fs/ocfs2/dlmglue.c:2875 #2: ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] #2: ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_wipe_inode fs/ocfs2/inode.c:852 [inline] #2: ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_delete_inode fs/ocfs2/inode.c:1155 [inline] #2: ffff888053ff5f40 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_evict_inode+0xf86/0x40e0 fs/ocfs2/inode.c:1292 stack backtrace: CPU: 0 UID: 0 PID: 12718 Comm: syz-executor Not tainted 6.16.0-syzkaller-11699-g7e161a991ea7 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2043 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 inode_lock include/linux/fs.h:869 [inline] ocfs2_remove_inode fs/ocfs2/inode.c:731 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:894 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1155 [inline] ocfs2_evict_inode+0x153d/0x40e0 fs/ocfs2/inode.c:1292 evict+0x504/0x9c0 fs/inode.c:810 do_unlinkat+0x39f/0x560 fs/namei.c:4657 __do_sys_unlink fs/namei.c:4696 [inline] __se_sys_unlink fs/namei.c:4694 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4694 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:0x7f03a158e117 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 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:00007ffe22da6898 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f03a158e117 RDX: 00007ffe22da68c0 RSI: 00007ffe22da6950 RDI: 00007ffe22da6950 RBP: 00007ffe22da6950 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffe22da7a40 R13: 00007f03a1611bdd R14: 0000000000076d3a R15: 00007ffe22da8b10 syz-executor: attempt to access beyond end of device loop7: rw=0, sector=17057, nr_sectors = 1 limit=64 (syz-executor,12718,0):ocfs2_read_locked_inode:597 ERROR: status = -5 syz-executor: attempt to access beyond end of device loop7: rw=0, sector=17057, nr_sectors = 1 limit=64 (syz-executor,12718,1):ocfs2_read_locked_inode:597 ERROR: status = -5 syz-executor: attempt to access beyond end of device loop7: rw=0, sector=71, nr_sectors = 1 limit=64 (syz-executor,12718,0):ocfs2_assign_bh:2417 ERROR: status = -5 (syz-executor,12718,0):ocfs2_inode_lock_full_nested:2512 ERROR: status = -5 (syz-executor,12718,0):ocfs2_shutdown_local_alloc:412 ERROR: status = -5 syz-executor: attempt to access beyond end of device loop7: rw=1, sector=17024, nr_sectors = 1 limit=64 Buffer I/O error on dev loop7, logical block 17024, lost sync page write (syz-executor,12718,0):ocfs2_write_block:78 ERROR: status = -5 (syz-executor,12718,0):ocfs2_update_disk_slot:199 ERROR: status = -5 (syz-executor,12718,0):ocfs2_put_slot:517 ERROR: status = -5 (syz-executor,12718,0):ocfs2_journal_shutdown:1107 ERROR: status = -5 ocfs2: Unmounting device (7,7) on (node local)