syzbot


BUG: spinlock bad magic in add_wait_queue

Status: auto-closed as invalid on 2019/02/22 14:09
First crash: 2264d, last: 2241d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 BUG: spinlock bad magic in add_wait_queue 5 2253d 2294d 0/3 auto-closed as invalid on 2019/02/22 15:19

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled[   43.226547] BUG: spinlock bad magic on CPU#1, syz-executor2/5274
 lock: 0xffff8800b0712118, .magic: dead4eac, .owner: <none>/-1, .owner_cpu: -1
CPU: 1 PID: 5274 Comm: syz-executor2 Not tainted 4.4.120-gd63fdf6 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 0000000000000000 3420148e19541b0f ffff8801c738fc18 ffffffff81d0408d
 ffff8800b0712118 ffff8801c5cd6000 ffff8800b0712118 ffff8800b3b0b7b8
 ffff8801c5c4ac01 ffff8801c738fc58 ffffffff81246aad ffff880100000000
Call Trace:
 [<ffffffff81d0408d>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d0408d>] dump_stack+0xc1/0x124 lib/dump_stack.c:51
 [<ffffffff81246aad>] spin_dump+0x14d/0x280 kernel/locking/spinlock_debug.c:67
 [<ffffffff81246e98>] spin_bug kernel/locking/spinlock_debug.c:75 [inline]
 [<ffffffff81246e98>] debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline]
 [<ffffffff81246e98>] do_raw_spin_lock+0x228/0x2c0 kernel/locking/spinlock_debug.c:135
 [<ffffffff83773546>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:119 [inline]
 [<ffffffff83773546>] _raw_spin_lock_irqsave+0x56/0x70 kernel/locking/spinlock.c:159
 [<ffffffff8121fbdf>] add_wait_queue+0x3f/0xa0 kernel/sched/wait.c:28
 [<ffffffff815f5a0c>] ep_ptable_queue_proc+0x17c/0x270 fs/eventpoll.c:1110
 [<ffffffff825b69db>] poll_wait include/linux/poll.h:45 [inline]
 [<ffffffff825b69db>] sg_poll+0xcb/0x340 drivers/scsi/sg.c:1169
 [<ffffffff815fac01>] ep_item_poll fs/eventpoll.c:806 [inline]
 [<ffffffff815fac01>] ep_insert fs/eventpoll.c:1319 [inline]
 [<ffffffff815fac01>] SYSC_epoll_ctl fs/eventpoll.c:1934 [inline]
 [<ffffffff815fac01>] SyS_epoll_ctl+0x10b1/0x2040 fs/eventpoll.c:1833
 [<ffffffff8377395f>] entry_SYSCALL_64_fastpath+0x1c/0x98
SELinux: unrecognized netlink message: protocol=6 nlmsg_type=36158 sclass=netlink_xfrm_socket
SELinux: unrecognized netlink message: protocol=6 nlmsg_type=36158 sclass=netlink_xfrm_socket
audit: type=1326 audit(1521007033.447:5): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5293 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453e69 code=0x0
audit: type=1326 audit(1521007033.517:6): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5293 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453e69 code=0x0
kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 5271 Comm: syz-executor7 Not tainted 4.4.120-gd63fdf6 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8801c5cd1800 task.stack: ffff8800aacc0000
RIP: 0010:[<ffffffff81434701>]  [<ffffffff81434701>] __read_once_size include/linux/compiler.h:218 [inline]
RIP: 0010:[<ffffffff81434701>]  [<ffffffff81434701>] atomic_read arch/x86/include/asm/atomic.h:27 [inline]
RIP: 0010:[<ffffffff81434701>]  [<ffffffff81434701>] put_page_testzero include/linux/mm.h:357 [inline]
RIP: 0010:[<ffffffff81434701>]  [<ffffffff81434701>] __free_pages+0x21/0x90 mm/page_alloc.c:3365
RSP: 0018:ffff8800aacc79f0  EFLAGS: 00010a07
RAX: dffffc0000000000 RBX: dead4ead00000000 RCX: ffffffff825b85eb
RDX: 1bd5a9d5a0000003 RSI: 0000000000000006 RDI: dead4ead0000001c
RBP: ffff8800aacc7a00 R08: 0000000048000000 R09: 0000000000001e30
R10: 0000000000002100 R11: 1ffff10015598f1c R12: 0000000000000004
R13: 0000000000000020 R14: ffff8801c294a100 R15: dffffc0000000000
FS:  00007fe546949700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000a3f228 CR3: 00000000b3886000 CR4: 0000000000160670
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 0000000000000246 ffff8801c294a258 ffff8800aacc7a60 ffffffff825b8611
 ffff8801c294a270 ffffed003852944b ffffed003852944e ffff8801c294a268
 dead4ead00000000 ffff8801c294a240 0000000000000000 0000000000000000
Call Trace:
 [<ffffffff825b8611>] sg_remove_scat.isra.17+0x1c1/0x2d0 drivers/scsi/sg.c:1954
 [<ffffffff825b89d5>] sg_finish_rem_req+0x2b5/0x340 drivers/scsi/sg.c:1835
 [<ffffffff825b8bdd>] sg_new_read.isra.18+0x17d/0x3c0 drivers/scsi/sg.c:577
 [<ffffffff825ba6fc>] sg_read+0x8bc/0x1490 drivers/scsi/sg.c:466
 [<ffffffff8151d801>] do_loop_readv_writev+0x141/0x1e0 fs/read_write.c:680
 [<ffffffff8151fb5d>] do_readv_writev+0x5dd/0x6e0 fs/read_write.c:810
 [<ffffffff8151fcd8>] vfs_readv+0x78/0xb0 fs/read_write.c:834
 [<ffffffff81522009>] SYSC_readv fs/read_write.c:860 [inline]
 [<ffffffff81522009>] SyS_readv+0xd9/0x240 fs/read_write.c:852
 [<ffffffff8377395f>] entry_SYSCALL_64_fastpath+0x1c/0x98
Code: c6 a0 0c 00 e9 78 fd ff ff 90 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 49 
RIP  [<ffffffff81434701>] __read_once_size include/linux/compiler.h:218 [inline]
RIP  [<ffffffff81434701>] atomic_read arch/x86/include/asm/atomic.h:27 [inline]
RIP  [<ffffffff81434701>] put_page_testzero include/linux/mm.h:357 [inline]
RIP  [<ffffffff81434701>] __free_pages+0x21/0x90 mm/page_alloc.c:3365
 RSP <ffff8800aacc79f0>
---[ end trace ff9af1f2866a6399 ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/14 05:57 https://android.googlesource.com/kernel/common android-4.4 d63fdf61a4dc 08dacaa0 .config console log report ci-android-44-kasan-gce
2018/04/06 05:27 https://android.googlesource.com/kernel/common android-4.4 38f41ec1cb31 a932eae6 .config console log report ci-android-44-kasan-gce-386
* Struck through repros no longer work on HEAD.