kernel write not supported for file /sg0 (pid: 5246 comm: kworker/2:4) ------------[ cut here ]------------ WARNING: CPU: 2 PID: 5246 at drivers/scsi/sg.c:2236 sg_remove_sfp_usercontext+0x490/0x610 drivers/scsi/sg.c:2236 Modules linked in: CPU: 2 PID: 5246 Comm: kworker/2:4 Not tainted 6.9.0-rc3-syzkaller-00058-ga6189a740779 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Workqueue: events sg_remove_sfp_usercontext RIP: 0010:sg_remove_sfp_usercontext+0x490/0x610 drivers/scsi/sg.c:2236 Code: ad a2 8b e8 e2 70 ec ff e9 36 fe ff ff e8 a8 b3 be fb be 03 00 00 00 48 89 ef e8 3b a4 ad fe e9 44 ff ff ff e8 91 b3 be fb 90 <0f> 0b 90 e9 d9 fe ff ff e8 83 b3 be fb 49 8d 97 4d 01 00 00 4c 89 RSP: 0018:ffffc90000e0fc58 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffffffff85cfa148 RDX: ffff88801ac58000 RSI: ffffffff85cfa26f RDI: 0000000000000005 RBP: ffff88801fd97578 R08: 0000000000000005 R09: 0000000000000001 R10: 0000000000000002 R11: 0000000000000002 R12: 0000000000008000 R13: ffff88805e3a8140 R14: 0000000000000000 R15: ffff88801fd97400 FS: 0000000000000000(0000) GS:ffff88802c400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002de25000 CR3: 000000000d57a000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: process_one_work+0x902/0x1a30 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244