BUG: spinlock bad magic on CPU#0, syzkaller591762/5365 lock: 0xffff8801ce75ed68, .magic: ffff8801, .owner: syzkaller591762/5365, .owner_cpu: 0 CPU: 0 PID: 5365 Comm: syzkaller591762 Not tainted 4.13.0-mm1+ #7 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 spin_dump+0x14d/0x280 kernel/locking/spinlock_debug.c:67 spin_bug kernel/locking/spinlock_debug.c:75 [inline] debug_spin_unlock kernel/locking/spinlock_debug.c:97 [inline] do_raw_spin_unlock+0x2bd/0x330 kernel/locking/spinlock_debug.c:134 __raw_spin_unlock include/linux/spinlock_api_smp.h:151 [inline] _raw_spin_unlock+0x22/0x30 kernel/locking/spinlock.c:183 spin_unlock include/linux/spinlock.h:356 [inline] __fanout_link+0xaf/0xf0 net/packet/af_packet.c:1508 register_prot_hook.part.49+0x45/0xb0 net/packet/af_packet.c:344 register_prot_hook net/packet/af_packet.c:4216 [inline] packet_set_ring+0xf3c/0x1b70 net/packet/af_packet.c:4338 packet_setsockopt+0x6cd/0x1e80 net/packet/af_packet.c:3660 SYSC_setsockopt net/socket.c:1852 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1831 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x445909 RSP: 002b:00007f5b6a23edc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445909 RDX: 0000000000000005 RSI: 0000000000000107 RDI: 0000000000000023 RBP: 0000000000000082 R08: 000000000000047e R09: 00007f5b6a23f700 R10: 0000000020001000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffc076ce69f R14: 00007f5b6a23f9c0 R15: 0000000000000000