Process accounting resumed ====================================================== WARNING: possible circular locking dependency detected 6.0.0-rc3-next-20220829 #1 Not tainted ------------------------------------------------------ syz-executor.3/8901 is trying to acquire lock: ffff88800f4ae3f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: __jbd2_log_wait_for_space+0x234/0x460 but task is already holding lock: ffff88801dd6a1d0 (&sb->s_type->i_mutex_key#6){++++}-{3:3}, at: vfs_unlink+0xd5/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+0x98/0x450 ext4_bmap+0x4e/0x470 bmap+0xac/0x120 jbd2_journal_bmap+0xa8/0x180 jbd2_journal_flush+0x853/0xc00 __ext4_ioctl+0x9e9/0x4090 __x64_sys_ioctl+0x19a/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a2/0x530 mutex_lock_io_nested+0x148/0x1310 __jbd2_log_wait_for_space+0x234/0x460 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3ac/0x14c0 jbd2__journal_start+0x390/0x8d0 __ext4_journal_start_sb+0x391/0x470 ext4_unlink+0x4e4/0x8b0 vfs_unlink+0x35a/0x930 do_unlinkat+0x3a9/0x630 __x64_sys_unlink+0xc6/0x110 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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.3/8901: #0: ffff88800f4aa438 (sb_writers#3){.+.+}-{0:0}, at: do_unlinkat+0x183/0x630 #1: ffff88801df0bfa0 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: do_unlinkat+0x270/0x630 #2: ffff88801dd6a1d0 (&sb->s_type->i_mutex_key#6){++++}-{3:3}, at: vfs_unlink+0xd5/0x930 stack backtrace: CPU: 1 PID: 8901 Comm: syz-executor.3 Not tainted 6.0.0-rc3-next-20220829 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 check_noncircular+0x263/0x2e0 __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a2/0x530 mutex_lock_io_nested+0x148/0x1310 __jbd2_log_wait_for_space+0x234/0x460 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3ac/0x14c0 jbd2__journal_start+0x390/0x8d0 __ext4_journal_start_sb+0x391/0x470 ext4_unlink+0x4e4/0x8b0 vfs_unlink+0x35a/0x930 do_unlinkat+0x3a9/0x630 __x64_sys_unlink+0xc6/0x110 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f188ae7a457 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:00007ffe1f850918 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f188ae7a457 RDX: 00007ffe1f850950 RSI: 00007ffe1f850950 RDI: 00007ffe1f8509e0 RBP: 00007ffe1f8509e0 R08: 0000000000000001 R09: 00007ffe1f8507b0 R10: 0000555555a19cbb R11: 0000000000000206 R12: 00007f188aed4105 R13: 00007ffe1f851aa0 R14: 0000555555a19c20 R15: 00007ffe1f851ae0 Invalid ELF header type: 3 != 1 Process accounting resumed Invalid ELF header type: 3 != 1 Process accounting resumed Invalid ELF header type: 3 != 1 Invalid ELF header type: 3 != 1 Invalid ELF header type: 3 != 1 Invalid ELF header type: 3 != 1 Process accounting resumed Invalid ELF header type: 3 != 1 Invalid ELF header type: 3 != 1 Invalid ELF header type: 3 != 1 Invalid ELF header type: 3 != 1 EXT4-fs warning (device sda): verify_group_input:150: Cannot add at group 7 (only 16 groups) EXT4-fs warning (device sda): verify_group_input:150: Cannot add at group 7 (only 16 groups) capability: warning: `syz-executor.7' uses deprecated v2 capabilities in a way that may be insecure SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pid=10584 comm=syz-executor.2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pid=10593 comm=syz-executor.2 netlink: 'syz-executor.2': attribute type 58 has an invalid length.