------------[ cut here ]------------ WARNING: CPU: 2 PID: 15938 at drivers/scsi/scsi_lib.c:991 scsi_alloc_sgtables+0xc85/0xf70 drivers/scsi/scsi_lib.c:991 Modules linked in: CPU: 2 PID: 15938 Comm: syz-executor.3 Not tainted 5.16.0-rc3-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 RIP: 0010:scsi_alloc_sgtables+0xc85/0xf70 drivers/scsi/scsi_lib.c:991 Code: e7 fc 31 ff 44 89 f6 e8 99 13 e7 fc 45 85 f6 0f 84 12 f5 ff ff e8 6b 11 e7 fc 83 c5 01 0f b7 ed e9 07 f5 ff ff e8 5b 11 e7 fc <0f> 0b 41 be 0a 00 00 00 e9 2a fb ff ff 41 be 09 00 00 00 e9 1f fb RSP: 0018:ffffc900038d74a0 EFLAGS: 00010212 RAX: 00000000000084fe RBX: ffff88801c668668 RCX: ffffc9002150b000 RDX: 0000000000040000 RSI: ffffffff848fd2e5 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000000 R10: ffffffff848fd2b3 R11: 0000000000000000 R12: ffff88801448a000 R13: ffff88801c668540 R14: 0000000000000001 R15: 0000000000000000 FS: 00007fa1dc8c3700(0000) GS:ffff88802cc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020001580 CR3: 0000000078bd0000 CR4: 0000000000150ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: scsi_setup_scsi_cmnd drivers/scsi/scsi_lib.c:1178 [inline] scsi_prepare_cmd drivers/scsi/scsi_lib.c:1573 [inline] scsi_queue_rq+0x2551/0x32e0 drivers/scsi/scsi_lib.c:1689 blk_mq_dispatch_rq_list+0x6fd/0x2340 block/blk-mq.c:1663 __blk_mq_sched_dispatch_requests+0x20b/0x410 block/blk-mq-sched.c:325 blk_mq_sched_dispatch_requests+0xfb/0x180 block/blk-mq-sched.c:358 __blk_mq_run_hw_queue+0xd8/0x150 block/blk-mq.c:1785 __blk_mq_delay_run_hw_queue+0x547/0x640 block/blk-mq.c:1862 blk_mq_run_hw_queue+0x16c/0x2f0 block/blk-mq.c:1915 blk_mq_sched_insert_request+0x368/0x450 block/blk-mq-sched.c:477 blk_execute_rq+0xd2/0x350 block/blk-exec.c:102 sg_io+0x685/0x1210 drivers/scsi/scsi_ioctl.c:486 scsi_ioctl_sg_io drivers/scsi/scsi_ioctl.c:874 [inline] scsi_ioctl+0xa77/0x1570 drivers/scsi/scsi_ioctl.c:930 sr_block_ioctl+0x1ce/0x210 drivers/scsi/sr.c:587 blkdev_ioctl+0x37a/0x800 block/ioctl.c:609 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fa1df34dae9 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa1dc8c3188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fa1df460f60 RCX: 00007fa1df34dae9 RDX: 0000000020001580 RSI: 0000000000002285 RDI: 0000000000000003 RBP: 00007fa1df3a7f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcdbce327f R14: 00007fa1dc8c3300 R15: 0000000000022000