====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc6-next-20230201 #1 Not tainted ------------------------------------------------------ syz-executor.7/273 is trying to acquire lock: ffff88800ffd43f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: __jbd2_log_wait_for_space+0x238/0x4b0 but task is already holding lock: ffff888044bbb5b0 (&sb->s_type->i_mutex_key#6){++++}-{3:3}, at: vfs_unlink+0xd9/0x930 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#6){++++}-{3:3}: down_read+0x3d/0x50 ext4_bmap+0x52/0x470 bmap+0xb0/0x130 jbd2_journal_bmap+0xac/0x1d0 jbd2_journal_flush+0x87f/0xc90 __ext4_ioctl+0x9fd/0x4330 __x64_sys_ioctl+0x19e/0x210 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc -> #0 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: __lock_acquire+0x2da7/0x63b0 lock_acquire.part.0+0xec/0x320 mutex_lock_io_nested+0x149/0x1300 __jbd2_log_wait_for_space+0x238/0x4b0 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3a6/0x14d0 jbd2__journal_start+0x394/0x6b0 __ext4_journal_start_sb+0x4c2/0x6f0 __ext4_unlink+0x44e/0xcf0 ext4_unlink+0x3ac/0x640 vfs_unlink+0x35e/0x930 do_unlinkat+0x3b9/0x650 __x64_sys_unlink+0xca/0x110 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#6); lock(&journal->j_checkpoint_mutex); lock(&sb->s_type->i_mutex_key#6); lock(&journal->j_checkpoint_mutex); *** DEADLOCK *** 3 locks held by syz-executor.7/273: #0: ffff88800ffd0438 (sb_writers#3){.+.+}-{0:0}, at: do_unlinkat+0x190/0x650 #1: ffff888044bf5d70 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: do_unlinkat+0x280/0x650 #2: ffff888044bbb5b0 (&sb->s_type->i_mutex_key#6){++++}-{3:3}, at: vfs_unlink+0xd9/0x930 stack backtrace: CPU: 1 PID: 273 Comm: syz-executor.7 Not tainted 6.2.0-rc6-next-20230201 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xf0 check_noncircular+0x263/0x2e0 __lock_acquire+0x2da7/0x63b0 lock_acquire.part.0+0xec/0x320 mutex_lock_io_nested+0x149/0x1300 __jbd2_log_wait_for_space+0x238/0x4b0 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3a6/0x14d0 jbd2__journal_start+0x394/0x6b0 __ext4_journal_start_sb+0x4c2/0x6f0 __ext4_unlink+0x44e/0xcf0 ext4_unlink+0x3ac/0x640 vfs_unlink+0x35e/0x930 do_unlinkat+0x3b9/0x650 __x64_sys_unlink+0xca/0x110 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f197286b457 Code: 73 01 c3 48 c7 c1 bc 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe7d3a6868 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f197286b457 RDX: 00007ffe7d3a68a0 RSI: 00007ffe7d3a68a0 RDI: 00007ffe7d3a6930 RBP: 00007ffe7d3a6930 R08: 0000000000000001 R09: 00007ffe7d3a6700 R10: 0000555556e64cdb R11: 0000000000000206 R12: 00007f19728c5105 R13: 00007ffe7d3a79f0 R14: 0000555556e64c20 R15: 00007ffe7d3a7a30 nfs4: Bad value for 'source' sr 1:0:0:0: [sr0] tag#0 unaligned transfer blk_print_req_error: 14 callbacks suppressed I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 buffer_io_error: 14 callbacks suppressed Buffer I/O error on dev sr0, logical block 0, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 1, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 2, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 3 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 3, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 4 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 4, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 5 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 5, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 6 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 6, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 7 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 7, async page read tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol'