syzbot


KCSAN: data-race in kthread_insert_work / kthread_worker_fn

Status: auto-closed as invalid on 2020/03/26 10:23
Subsystems: block
[Documentation on labels]
First crash: 1562d, last: 1562d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in kthread_insert_work / kthread_worker_fn (3) block 3 1039d 1078d 0/26 auto-closed as invalid on 2021/07/26 20:01
upstream KCSAN: data-race in kthread_insert_work / kthread_worker_fn (2) block 1 1470d 1470d 0/26 closed as invalid on 2020/06/18 14:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in kthread_insert_work / kthread_worker_fn

write to 0xffff88812a103540 of 8 bytes by task 27794 on cpu 1:
 kthread_worker_fn+0x7b/0x3a0 kernel/kthread.c:643
 loop_kthread_worker_fn+0x50/0x70 drivers/block/loop.c:901
 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

read to 0xffff88812a103540 of 8 bytes by task 27792 on cpu 0:
 kthread_insert_work kernel/kthread.c:802 [inline]
 kthread_insert_work+0x116/0x140 kernel/kthread.c:794
 kthread_queue_work+0xd4/0xf0 kernel/kthread.c:826
 loop_queue_rq+0x23f/0x280 drivers/block/loop.c:1935
 blk_mq_dispatch_rq_list+0xbe9/0xe40 block/blk-mq.c:1238
 blk_mq_do_dispatch_sched+0x11d/0x260 block/blk-mq-sched.c:115
 blk_mq_sched_dispatch_requests+0x2b4/0x380 block/blk-mq-sched.c:211
 __blk_mq_run_hw_queue+0xb7/0x160 block/blk-mq.c:1368
 __blk_mq_delay_run_hw_queue+0x31b/0x3a0 block/blk-mq.c:1436
 blk_mq_run_hw_queue+0xfd/0x1c0 block/blk-mq.c:1473
 blk_mq_sched_insert_requests+0x198/0x260 block/blk-mq-sched.c:444
 blk_mq_flush_plug_list+0x572/0x6c0 block/blk-mq.c:1733
 blk_flush_plug_list+0x271/0x2a0 block/blk-core.c:1768
 blk_finish_plug block/blk-core.c:1785 [inline]
 blk_finish_plug+0x60/0x84 block/blk-core.c:1781
 read_pages+0xbc/0x2d0 mm/readahead.c:142
 __do_page_cache_readahead+0x353/0x390 mm/readahead.c:212
 force_page_cache_readahead+0x13a/0x1f0 mm/readahead.c:243
 page_cache_sync_readahead+0x1cf/0x1e0 mm/readahead.c:522
 generic_file_buffered_read mm/filemap.c:2051 [inline]
 generic_file_read_iter+0xeb6/0x1440 mm/filemap.c:2324
 blkdev_read_iter+0xb2/0xe0 fs/block_dev.c:2039
 call_read_iter include/linux/fs.h:1896 [inline]
 new_sync_read+0x389/0x4f0 fs/read_write.c:414
 __vfs_read+0xb1/0xc0 fs/read_write.c:427
 vfs_read fs/read_write.c:461 [inline]
 vfs_read+0x143/0x2c0 fs/read_write.c:446
 ksys_read+0xd5/0x1b0 fs/read_write.c:587
 __do_sys_read fs/read_write.c:597 [inline]
 __se_sys_read fs/read_write.c:595 [inline]
 __x64_sys_read+0x4c/0x60 fs/read_write.c:595
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 27792 Comm: blkid Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/16 10:21 https://github.com/google/ktsan.git kcsan 245a43005292 f9b69507 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.