syzbot


WARNING in kthread_queue_work

Status: closed as invalid on 2020/07/15 11:16
Reported-by: syzbot+fa64e680a1ff32087778@syzkaller.appspotmail.com
First crash: 808d, last: 807d

Cause bisection: introduced by (bisect log) :
commit 4977caef05aa154f5e45a232fc4f0e1c74a0c739
Author: Zhang Qiang <qiang.zhang@windriver.com>
Date: Tue Jul 7 02:29:47 2020 +0000

  kthread: work could not be queued when worker being destroyed

Crash: WARNING in kthread_queue_work (log)
Repro: C syz .config

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 6844 at kernel/kthread.c:819 queuing_blocked kernel/kthread.c:819 [inline]
WARNING: CPU: 1 PID: 6844 at kernel/kthread.c:819 kthread_queue_work+0x16d/0x1b0 kernel/kthread.c:866
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 6844 Comm: systemd-udevd Not tainted 5.8.0-rc4-next-20200708-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x18f/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:231
 __warn.cold+0x20/0x45 kernel/panic.c:600
 report_bug+0x1bd/0x210 lib/bug.c:198
 handle_bug+0x38/0x90 arch/x86/kernel/traps.c:234
 exc_invalid_op+0x13/0x40 arch/x86/kernel/traps.c:254
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:542
RIP: 0010:queuing_blocked kernel/kthread.c:819 [inline]
RIP: 0010:kthread_queue_work+0x16d/0x1b0 kernel/kthread.c:866
Code: 0f 85 72 ff ff ff e8 62 49 26 00 48 8d 55 48 4c 89 e6 48 89 ef e8 63 ec ff ff 41 bc 01 00 00 00 e9 56 ff ff ff e8 43 49 26 00 <0f> 0b 45 31 e4 e9 47 ff ff ff 48 c7 c7 f4 61 af 8a e8 dd fd 65 00
RSP: 0018:ffffc900016e72b8 EFLAGS: 00010093
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff814db478
RDX: ffff888095b08440 RSI: ffffffff814db4ed RDI: ffff8880a1d731c0
RBP: ffff8880a1d73158 R08: 0000000000000001 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a14d6328
R13: 0000000000000286 R14: ffff8880a1d73160 R15: dffffc0000000000
 loop_queue_rq+0x428/0x590 drivers/block/loop.c:2027
 blk_mq_dispatch_rq_list+0x2e0/0x1e40 block/blk-mq.c:1389
 __blk_mq_do_dispatch_sched+0x3bc/0x870 block/blk-mq-sched.c:194
 blk_mq_do_dispatch_sched block/blk-mq-sched.c:207 [inline]
 __blk_mq_sched_dispatch_requests+0x394/0x490 block/blk-mq-sched.c:323
 blk_mq_sched_dispatch_requests+0xfb/0x180 block/blk-mq-sched.c:349
 __blk_mq_run_hw_queue+0x13a/0x2d0 block/blk-mq.c:1529
 __blk_mq_delay_run_hw_queue+0x522/0x5f0 block/blk-mq.c:1606
 blk_mq_run_hw_queue+0x16c/0x2f0 block/blk-mq.c:1659
 blk_mq_sched_insert_requests+0x286/0x620 block/blk-mq-sched.c:603
 blk_mq_flush_plug_list+0x3d8/0x560 block/blk-mq.c:1928
 blk_flush_plug_list block/blk-core.c:1867 [inline]
 blk_finish_plug block/blk-core.c:1884 [inline]
 blk_finish_plug+0x83/0xe0 block/blk-core.c:1880
 read_pages+0x4a5/0x8d0 mm/readahead.c:150
 page_cache_readahead_unbounded+0x572/0x850 mm/readahead.c:244
 __do_page_cache_readahead mm/readahead.c:273 [inline]
 force_page_cache_readahead+0x2e9/0x460 mm/readahead.c:303
 page_cache_sync_readahead mm/readahead.c:580 [inline]
 page_cache_sync_readahead+0x113/0x130 mm/readahead.c:567
 generic_file_buffered_read+0x159d/0x3150 mm/filemap.c:2058
 generic_file_read_iter+0x396/0x4e0 mm/filemap.c:2362
 blkdev_read_iter+0x11b/0x180 fs/block_dev.c:2021
 call_read_iter include/linux/fs.h:1873 [inline]
 new_sync_read+0x41a/0x6e0 fs/read_write.c:414
 vfs_read+0x45c/0x520 fs/read_write.c:493
 ksys_read+0x12d/0x250 fs/read_write.c:624
 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7ff65bf6a210
Code: Bad RIP value.
RSP: 002b:00007ffde963e968 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000557d6f90c200 RCX: 00007ff65bf6a210
RDX: 0000000000000400 RSI: 0000557d6f90c228 RDI: 000000000000000f
RBP: 0000557d6f90ed90 R08: 00007ff65bf54fe8 R09: 0000000000000430
R10: 0000557d6f90c218 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000400 R14: 0000557d6f90ede0 R15: 0000000000000400
Shutting down cpus with NMI
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2223):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2020/07/09 11:54 linux-next 8903263671cb bc238812 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/07/10 07:10 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 06:33 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 06:04 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 05:43 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 05:23 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 05:03 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 04:46 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 04:24 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 03:57 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 03:27 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 03:09 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 02:49 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 02:27 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 01:59 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 01:38 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 01:23 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 01:06 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 00:42 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/10 00:14 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 23:51 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 23:22 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 22:54 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 22:36 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 22:16 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 21:56 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 21:37 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 21:18 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 20:58 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 20:36 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 20:18 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 19:55 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 19:28 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 19:05 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 18:35 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 18:02 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 17:37 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 16:55 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 16:38 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 16:15 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 15:51 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/09 15:23 linux-next 8903263671cb bc238812 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/07/08 22:16 linux-next 8903263671cb bc238812 .config log report
* Struck through repros no longer work on HEAD.