/dev/sg0: Can't lookup blockdev BUG: spinlock bad magic on CPU#3, syz.1.1984/13244 Oops: general protection fault, probably for non-canonical address 0xdffffc00000000d2: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000690-0x0000000000000697] CPU: 3 UID: 0 PID: 13244 Comm: syz.1.1984 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:task_pid_nr include/linux/pid.h:236 [inline] RIP: 0010:spin_dump+0xd7/0x160 kernel/locking/spinlock_debug.c:64 Code: 09 84 d2 74 05 e8 f9 33 57 01 44 8b 63 08 48 85 ed 74 37 48 8d bd 40 06 00 00 b8 ff ff 37 00 48 89 fa 48 c1 e0 2a 48 c1 ea 03 <8a> 04 02 84 c0 74 09 3c 03 7f 05 e8 c9 33 57 01 44 8b ad 40 06 00 RSP: 0018:ffffc9000743f8b8 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: ffff88806a97e800 RCX: 0000000000000000 RDX: 00000000000000d2 RSI: ffffffff81e815e9 RDI: 0000000000000690 RBP: 0000000000000050 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000001 R11: 697073203a475542 R12: 0000000089ad02c0 R13: ffff888047364a80 R14: ffff888024bace88 R15: ffff888024bace68 FS: 0000000000000000(0000) GS:ffff888096ee3000(0063) knlGS:00000000f544db40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f73a67b8 CR3: 000000005a14c000 CR4: 0000000000352ef0 Call Trace: spin_bug kernel/locking/spinlock_debug.c:78 [inline] debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock.cold+0x37/0x3c kernel/locking/spinlock_debug.c:115 spin_lock_irq include/linux/spinlock.h:372 [inline] gadget_dev_open+0x44/0x1b0 drivers/usb/gadget/legacy/inode.c:1919 do_dentry_open+0x6ab/0x14d0 fs/open.c:947 vfs_open+0x82/0x3f0 fs/open.c:1052 do_open fs/namei.c:4700 [inline] path_openat+0x2873/0x4280 fs/namei.c:4863 do_file_open+0x20e/0x430 fs/namei.c:4892 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_compat_sys_openat fs/open.c:1436 [inline] __se_compat_sys_openat fs/open.c:1434 [inline] __ia32_compat_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf705efec Code: Unable to access opcode bytes at 0xf705efc2. RSP: 002b:00000000f544d50c EFLAGS: 00000292 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 0000000080000300 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:task_pid_nr include/linux/pid.h:236 [inline] RIP: 0010:spin_dump+0xd7/0x160 kernel/locking/spinlock_debug.c:64 Code: 09 84 d2 74 05 e8 f9 33 57 01 44 8b 63 08 48 85 ed 74 37 48 8d bd 40 06 00 00 b8 ff ff 37 00 48 89 fa 48 c1 e0 2a 48 c1 ea 03 <8a> 04 02 84 c0 74 09 3c 03 7f 05 e8 c9 33 57 01 44 8b ad 40 06 00 RSP: 0018:ffffc9000743f8b8 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: ffff88806a97e800 RCX: 0000000000000000 RDX: 00000000000000d2 RSI: ffffffff81e815e9 RDI: 0000000000000690 RBP: 0000000000000050 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000001 R11: 697073203a475542 R12: 0000000089ad02c0 R13: ffff888047364a80 R14: ffff888024bace88 R15: ffff888024bace68 FS: 0000000000000000(0000) GS:ffff888096ee3000(0063) knlGS:00000000f544db40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f705f000 CR3: 000000005a14c000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: 09 84 d2 74 05 e8 f9 or %eax,-0x617fa8c(%rdx,%rdx,8) 7: 33 57 01 xor 0x1(%rdi),%edx a: 44 8b 63 08 mov 0x8(%rbx),%r12d e: 48 85 ed test %rbp,%rbp 11: 74 37 je 0x4a 13: 48 8d bd 40 06 00 00 lea 0x640(%rbp),%rdi 1a: b8 ff ff 37 00 mov $0x37ffff,%eax 1f: 48 89 fa mov %rdi,%rdx 22: 48 c1 e0 2a shl $0x2a,%rax 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 8a 04 02 mov (%rdx,%rax,1),%al <-- trapping instruction 2d: 84 c0 test %al,%al 2f: 74 09 je 0x3a 31: 3c 03 cmp $0x3,%al 33: 7f 05 jg 0x3a 35: e8 c9 33 57 01 call 0x1573403 3a: 44 rex.R 3b: 8b .byte 0x8b 3c: ad lods %ds:(%rsi),%eax 3d: 40 06 rex (bad)