sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer ====================================================== WARNING: possible circular locking dependency detected 5.19.0-next-20220804 #1 Not tainted ------------------------------------------------------ rs:main Q:Reg/189 is trying to acquire lock: ffff88800fe243f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: __jbd2_log_wait_for_space+0x234/0x460 but task is already holding lock: ffff88801b1d2bc0 (&sb->s_type->i_mutex_key#6){++++}-{3:3}, at: ext4_buffered_write_iter+0xb0/0x460 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_dirty_inode+0x9d/0x110 __mark_inode_dirty+0x455/0xf00 generic_update_time+0x21d/0x350 file_modified_flags+0x2d4/0x330 ext4_buffered_write_iter+0xf9/0x460 ext4_file_write_iter+0x3d5/0x1820 vfs_write+0x9c3/0xd90 ksys_write+0x127/0x250 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 rs:main Q:Reg/189: #0: ffff88800f8be868 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe7/0x100 #1: ffff88800fe20438 (sb_writers#3){.+.+}-{0:0}, at: ksys_write+0x127/0x250 #2: ffff88801b1d2bc0 (&sb->s_type->i_mutex_key#6){++++}-{3:3}, at: ext4_buffered_write_iter+0xb0/0x460 stack backtrace: CPU: 0 PID: 189 Comm: rs:main Q:Reg Not tainted 5.19.0-next-20220804 #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_dirty_inode+0x9d/0x110 __mark_inode_dirty+0x455/0xf00 generic_update_time+0x21d/0x350 file_modified_flags+0x2d4/0x330 ext4_buffered_write_iter+0xf9/0x460 ext4_file_write_iter+0x3d5/0x1820 vfs_write+0x9c3/0xd90 ksys_write+0x127/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f688588dfef Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 5c fd ff ff 48 RSP: 002b:00007f6884a49860 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f687c0042f0 RCX: 00007f688588dfef RDX: 000000000000005c RSI: 00007f687c0045b0 RDI: 0000000000000007 RBP: 000000000000005c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f687c0045b0 R13: 0000000000000000 R14: 000000000000005c R15: 00007f687c0042f0 sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 40 00 sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 40 00 sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 40 00 sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer syz-executor.4 uses obsolete (PF_INET,SOCK_PACKET) warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow ------------[ cut here ]------------ WARNING: CPU: 1 PID: 8444 at kernel/workqueue.c:3066 __flush_work+0xaaa/0xd20 Modules linked in: CPU: 1 PID: 8444 Comm: syz-executor.0 Not tainted 5.19.0-next-20220804 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:__flush_work+0xaaa/0xd20 Code: 00 48 c7 c6 af 73 1c 81 48 c7 c7 60 52 40 85 e8 5c 78 0d 00 e9 11 fc ff ff e8 62 3c 29 00 0f 0b e9 05 fc ff ff e8 56 3c 29 00 <0f> 0b 45 31 ed e9 f6 fb ff ff e8 47 3c 29 00 4c 89 e7 e8 7f d5 03 RSP: 0018:ffff88800db776e8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88800f070988 RCX: 0000000000000000 RDX: ffff888010369b00 RSI: ffffffff811c73ea RDI: 0000000000000001 RBP: ffff88800db77890 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88800f070988 R13: 0000000000000001 R14: ffff88800f0709a0 R15: ffff888010369b00 FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201d9000 CR3: 000000001d160000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000600 Call Trace: __cancel_work_timer+0x39c/0x4e0 mgmt_index_removed+0x187/0x2f0 hci_unregister_dev+0x2e2/0x380 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xc31/0x2940 do_group_exit+0xd0/0x2a0 get_signal+0x2205/0x24b0 arch_do_signal_or_restart+0x89/0x1be0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x19/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f707249db19 Code: Unable to access opcode bytes at RIP 0x7f707249daef. RSP: 002b:00007f706fa13218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f70725b0f68 RCX: 00007f707249db19 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f70725b0f68 RBP: 00007f70725b0f60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f70725b0f6c R13: 00007ffdf1bb414f R14: 00007f706fa13300 R15: 0000000000022000 irq event stamp: 470 hardirqs last enabled at (469): [] syscall_enter_from_user_mode+0x1d/0x50 hardirqs last disabled at (470): [] __schedule+0x11d7/0x2490 softirqs last enabled at (430): [] mac80211_hwsim_netlink_notify+0x253/0xa00 softirqs last disabled at (428): [] mac80211_hwsim_netlink_notify+0x140/0xa00 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 1 PID: 8444 at kernel/workqueue.c:3066 __flush_work+0xaaa/0xd20 Modules linked in: CPU: 1 PID: 8444 Comm: syz-executor.0 Tainted: G W 5.19.0-next-20220804 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:__flush_work+0xaaa/0xd20 Code: 00 48 c7 c6 af 73 1c 81 48 c7 c7 60 52 40 85 e8 5c 78 0d 00 e9 11 fc ff ff e8 62 3c 29 00 0f 0b e9 05 fc ff ff e8 56 3c 29 00 <0f> 0b 45 31 ed e9 f6 fb ff ff e8 47 3c 29 00 4c 89 e7 e8 7f d5 03 RSP: 0018:ffff88800db776e8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88800f070a30 RCX: 0000000000000000 RDX: ffff888010369b00 RSI: ffffffff811c73ea RDI: 0000000000000001 RBP: ffff88800db77890 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88800f070a30 R13: 0000000000000001 R14: ffff88800f070a48 R15: ffff888010369b00 FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201d9000 CR3: 000000001d160000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000600 Call Trace: __cancel_work_timer+0x39c/0x4e0 mgmt_index_removed+0x193/0x2f0 hci_unregister_dev+0x2e2/0x380 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xc31/0x2940 do_group_exit+0xd0/0x2a0 get_signal+0x2205/0x24b0 arch_do_signal_or_restart+0x89/0x1be0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x19/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f707249db19 Code: Unable to access opcode bytes at RIP 0x7f707249daef. RSP: 002b:00007f706fa13218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f70725b0f68 RCX: 00007f707249db19 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f70725b0f68 RBP: 00007f70725b0f60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f70725b0f6c R13: 00007ffdf1bb414f R14: 00007f706fa13300 R15: 0000000000022000 irq event stamp: 470 hardirqs last enabled at (469): [] syscall_enter_from_user_mode+0x1d/0x50 hardirqs last disabled at (470): [] __schedule+0x11d7/0x2490 softirqs last enabled at (430): [] mac80211_hwsim_netlink_notify+0x253/0xa00 softirqs last disabled at (428): [] mac80211_hwsim_netlink_notify+0x140/0xa00 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 1 PID: 8444 at kernel/workqueue.c:3066 __flush_work+0xaaa/0xd20 Modules linked in: CPU: 1 PID: 8444 Comm: syz-executor.0 Tainted: G W 5.19.0-next-20220804 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:__flush_work+0xaaa/0xd20 Code: 00 48 c7 c6 af 73 1c 81 48 c7 c7 60 52 40 85 e8 5c 78 0d 00 e9 11 fc ff ff e8 62 3c 29 00 0f 0b e9 05 fc ff ff e8 56 3c 29 00 <0f> 0b 45 31 ed e9 f6 fb ff ff e8 47 3c 29 00 4c 89 e7 e8 7f d5 03 RSP: 0018:ffff88800db776e8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88800f071b30 RCX: 0000000000000000 RDX: ffff888010369b00 RSI: ffffffff811c73ea RDI: 0000000000000001 RBP: ffff88800db77890 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88800f071b30 R13: 0000000000000001 R14: ffff88800f071b48 R15: ffff888010369b00 FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201d9000 CR3: 000000001d160000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000600 Call Trace: __cancel_work_timer+0x39c/0x4e0 mgmt_index_removed+0x19f/0x2f0 hci_unregister_dev+0x2e2/0x380 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xc31/0x2940 do_group_exit+0xd0/0x2a0 get_signal+0x2205/0x24b0 arch_do_signal_or_restart+0x89/0x1be0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x19/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f707249db19 Code: Unable to access opcode bytes at RIP 0x7f707249daef. RSP: 002b:00007f706fa13218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f70725b0f68 RCX: 00007f707249db19 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f70725b0f68 RBP: 00007f70725b0f60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f70725b0f6c R13: 00007ffdf1bb414f R14: 00007f706fa13300 R15: 0000000000022000 irq event stamp: 470 hardirqs last enabled at (469): [] syscall_enter_from_user_mode+0x1d/0x50 hardirqs last disabled at (470): [] __schedule+0x11d7/0x2490 softirqs last enabled at (430): [] mac80211_hwsim_netlink_notify+0x253/0xa00 softirqs last disabled at (428): [] mac80211_hwsim_netlink_notify+0x140/0xa00 ---[ end trace 0000000000000000 ]---