syzbot


BUG: spinlock bad magic in __wake_up

Status: closed as invalid on 2019/01/16 18:02
First crash: 2257d, last: 2207d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 BUG: spinlock bad magic in __wake_up C 11 2199d 2238d 0/2 closed as invalid on 2019/01/16 18:02

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
BUG: spinlock bad magic on CPU#1, syz-executor3/13969
 lock: 0xffff8801bfea4218, .magic: dead4eac, .owner: <none>/-1, .owner_cpu: -1
CPU: 1 PID: 13969 Comm: syz-executor3 Not tainted 4.9.91-gcc88c05 #69
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801d37ef120 ffffffff81d95109 ffff8801bfea4218 ffff880122ef8000
 0000000000000001 0000000000000001 0000000000000000 ffff8801d37ef160
 ffffffff812477fd ffffffff81222d0e 0000000000000000 0000000000000000
Call Trace:
 [<ffffffff81d95109>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d95109>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff812477fd>] spin_dump+0x14d/0x280 kernel/locking/spinlock_debug.c:67
 [<ffffffff81247b34>] spin_bug kernel/locking/spinlock_debug.c:75 [inline]
 [<ffffffff81247b34>] debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline]
 [<ffffffff81247b34>] do_raw_spin_lock+0x174/0x1e0 kernel/locking/spinlock_debug.c:112
 [<ffffffff838b8306>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:119 [inline]
 [<ffffffff838b8306>] _raw_spin_lock_irqsave+0x56/0x70 kernel/locking/spinlock.c:159
 [<ffffffff81222d0e>] __wake_up+0x1e/0x50 kernel/sched/wait.c:94
 [<ffffffff8266d19c>] sg_rq_end_io+0x5dc/0xbc0 drivers/scsi/sg.c:1379
 [<ffffffff81d24824>] __blk_mq_end_request+0x54/0xc0 block/blk-mq.c:331
 [<ffffffff825d2605>] scsi_end_request+0x135/0x5c0 drivers/scsi/scsi_lib.c:627
 [<ffffffff825db5c5>] scsi_io_completion+0x965/0x1730 drivers/scsi/scsi_lib.c:966
 [<ffffffff825bec68>] scsi_finish_command+0x3b8/0x530 drivers/scsi/scsi.c:607
 [<ffffffff825d9910>] scsi_softirq_done+0x250/0x350 drivers/scsi/scsi_lib.c:1567
 [<ffffffff81d26445>] blk_mq_ipi_complete_request block/blk-mq.c:376 [inline]
 [<ffffffff81d26445>] __blk_mq_complete_request+0x205/0x4b0 block/blk-mq.c:388
 [<ffffffff81d26755>] blk_mq_complete_request+0x65/0x80 block/blk-mq.c:407
 [<ffffffff825d5a5e>] scsi_mq_done+0xce/0x320 drivers/scsi/scsi_lib.c:1877
 [<ffffffff825d0ee1>] scsi_dispatch_cmd+0x2b1/0x990 drivers/scsi/scsi_lib.c:1648
 [<ffffffff825d5110>] scsi_queue_rq+0x1170/0x19f0 drivers/scsi/scsi_lib.c:1924
 [<ffffffff81d2ac14>] __blk_mq_run_hw_queue+0x854/0xe30 block/blk-mq.c:826
 [<ffffffff81d2a33e>] blk_mq_run_hw_queue+0x13e/0x1c0 block/blk-mq.c:911
 [<ffffffff81d2f420>] blk_mq_insert_request+0x240/0x5c0 block/blk-mq.c:1053
 [<ffffffff81d1706c>] blk_execute_rq_nowait+0x12c/0x320 block/blk-exec.c:68
 [<ffffffff826709c5>] sg_common_write.isra.22+0xca5/0x18f0 drivers/scsi/sg.c:808
 [<ffffffff82671bf0>] sg_new_write.isra.25+0x5e0/0x940 drivers/scsi/sg.c:746
 [<ffffffff82673648>] sg_ioctl+0x16f8/0x2a10 drivers/scsi/sg.c:892
 [<ffffffff815add6a>] vfs_ioctl fs/ioctl.c:43 [inline]
 [<ffffffff815add6a>] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679
 [<ffffffff815aed8f>] SYSC_ioctl fs/ioctl.c:694 [inline]
 [<ffffffff815aed8f>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685
 [<ffffffff81006504>] do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b8493>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 13972 Comm: syz-executor2 Not tainted 4.9.91-gcc88c05 #69
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8801bf9b4800 task.stack: ffff8801d02e0000
RIP: 0010:[<ffffffff8144e0d1>]  [<ffffffff8144e0d1>] __read_once_size include/linux/compiler.h:243 [inline]
RIP: 0010:[<ffffffff8144e0d1>]  [<ffffffff8144e0d1>] atomic_read arch/x86/include/asm/atomic.h:26 [inline]
RIP: 0010:[<ffffffff8144e0d1>]  [<ffffffff8144e0d1>] page_ref_count include/linux/page_ref.h:66 [inline]
RIP: 0010:[<ffffffff8144e0d1>]  [<ffffffff8144e0d1>] put_page_testzero include/linux/mm.h:450 [inline]
RIP: 0010:[<ffffffff8144e0d1>]  [<ffffffff8144e0d1>] __free_pages+0x21/0x80 mm/page_alloc.c:3897
RSP: 0018:ffff8801d02e7ab0  EFLAGS: 00010a07
RAX: dffffc0000000000 RBX: dead4ead00000000 RCX: ffffffff826692ab
RDX: 1bd5a9d5a0000003 RSI: 0000000000000000 RDI: dead4ead0000001c
RBP: ffff8801d02e7ac0 R08: 0000000000000000 R09: ffffed003b05f191
R10: 0000000000000005 R11: ffffed003b05f190 R12: 0000000000000004
R13: 0000000000000020 R14: ffff8801cfb22100 R15: dffffc0000000000
FS:  00007f6412500700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1157a80000 CR3: 00000001caa1c000 CR4: 0000000000160670
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 0000000000000001 ffff8801cfb22258 ffff8801d02e7b20 ffffffff826692d1
 ffff8801cfb22270 ffffed0039f6444b ffffed0039f6444e ffff8801cfb22268
 dead4ead00000000 ffff8801cfb22240 0000000000000000 0000000000000000
Call Trace:
 [<ffffffff826692d1>] sg_remove_scat.isra.19+0x1c1/0x2d0 drivers/scsi/sg.c:1946
 [<ffffffff82669686>] sg_finish_rem_req+0x2a6/0x320 drivers/scsi/sg.c:1829
 [<ffffffff8266b572>] sg_read+0xa22/0x1470 drivers/scsi/sg.c:526
 [<ffffffff8156b603>] __vfs_read+0x103/0x670 fs/read_write.c:449
 [<ffffffff8156f51e>] vfs_read+0x11e/0x380 fs/read_write.c:472
 [<ffffffff81573219>] SYSC_read fs/read_write.c:588 [inline]
 [<ffffffff81573219>] SyS_read+0xd9/0x1b0 fs/read_write.c:581
 [<ffffffff81006504>] do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b8493>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
Code: e9 27 fc ff ff 0f 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 55 48 89 e5 53 48 89 fb 48 83 c7 1c 48 89 fa 48 83 ec 08 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 3d 
RIP  [<ffffffff8144e0d1>] __read_once_size include/linux/compiler.h:243 [inline]
RIP  [<ffffffff8144e0d1>] atomic_read arch/x86/include/asm/atomic.h:26 [inline]
RIP  [<ffffffff8144e0d1>] page_ref_count include/linux/page_ref.h:66 [inline]
RIP  [<ffffffff8144e0d1>] put_page_testzero include/linux/mm.h:450 [inline]
RIP  [<ffffffff8144e0d1>] __free_pages+0x21/0x80 mm/page_alloc.c:3897
 RSP <ffff8801d02e7ab0>
---[ end trace 158a9ff64f0d1cd3 ]---

Crashes (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/31 09:15 https://android.googlesource.com/kernel/common android-4.9 cc88c05eca31 8fbce0e4 .config console log report ci-android-49-kasan-gce
2018/03/29 20:01 https://android.googlesource.com/kernel/common android-4.9 bb94f9d8f542 d47f0ed6 .config console log report ci-android-49-kasan-gce
2018/03/14 12:44 https://android.googlesource.com/kernel/common android-4.9 97d7f1c7c0f0 08dacaa0 .config console log report ci-android-49-kasan-gce
2018/03/08 09:30 https://android.googlesource.com/kernel/common android-4.9 d3a2afb9382e d50edb7e .config console log report ci-android-49-kasan-gce
2018/02/26 07:09 https://android.googlesource.com/kernel/common android-4.9 a92bb8d6eac3 9fe8aa42 .config console log report ci-android-49-kasan-gce
2018/02/20 16:30 https://android.googlesource.com/kernel/common android-4.9 cdfc8df1d262 5abac192 .config console log report ci-android-49-kasan-gce
2018/02/20 03:14 https://android.googlesource.com/kernel/common android-4.9 cdfc8df1d262 c1f526e3 .config console log report ci-android-49-kasan-gce
2018/02/18 17:13 https://android.googlesource.com/kernel/common android-4.9 cdfc8df1d262 833f78c7 .config console log report ci-android-49-kasan-gce
2018/02/18 12:37 https://android.googlesource.com/kernel/common android-4.9 cdfc8df1d262 833f78c7 .config console log report ci-android-49-kasan-gce
2018/02/14 14:16 https://android.googlesource.com/kernel/common android-4.9 1a938310b8af 88bc17df .config console log report ci-android-49-kasan-gce
2018/02/12 17:50 https://android.googlesource.com/kernel/common android-4.9 8a174b4749d3 88bc17df .config console log report ci-android-49-kasan-gce
2018/02/12 03:21 https://android.googlesource.com/kernel/common android-4.9 8a174b4749d3 4e9b726d .config console log report ci-android-49-kasan-gce
2018/02/09 04:03 https://android.googlesource.com/kernel/common android-4.9 20c8a0089294 9fb5ec43 .config console log report ci-android-49-kasan-gce
2018/03/22 07:35 https://android.googlesource.com/kernel/common android-4.9 71df7bbae4d8 95c88d7a .config console log report ci-android-49-kasan-gce-386
2018/03/15 03:39 https://android.googlesource.com/kernel/common android-4.9 52447008883e 08dacaa0 .config console log report ci-android-49-kasan-gce-386
2018/02/21 20:29 https://android.googlesource.com/kernel/common android-4.9 7ec482be026a 04cbdbd1 .config console log report ci-android-49-kasan-gce-386
2018/02/15 20:56 https://android.googlesource.com/kernel/common android-4.9 2a5cc53ea19e c8b3f7c1 .config console log report ci-android-49-kasan-gce-386
2018/02/11 13:47 https://android.googlesource.com/kernel/common android-4.9 8a174b4749d3 4e9b726d .config console log report ci-android-49-kasan-gce-386
2018/02/11 02:33 https://android.googlesource.com/kernel/common android-4.9 8a174b4749d3 4e9b726d .config console log report ci-android-49-kasan-gce-386
* Struck through repros no longer work on HEAD.