syzbot


KCSAN: data-race in __mod_timer / blk_add_timer

Status: auto-closed as invalid on 2021/06/25 00:11
Subsystems: block
[Documentation on labels]
First crash: 1106d, last: 1072d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mod_timer / blk_add_timer (6) block 1 388d 368d 0/26 auto-obsoleted due to no activity on 2023/05/09 08:21
upstream KCSAN: data-race in __mod_timer / blk_add_timer (3) block 8 847d 945d 0/26 auto-closed as invalid on 2022/02/04 22:18
upstream KCSAN: data-race in __mod_timer / blk_add_timer (2) block 2 997d 1027d 0/26 auto-closed as invalid on 2021/09/07 18:24
upstream KCSAN: data-race in __mod_timer / blk_add_timer (4) block 2 754d 773d 0/26 auto-closed as invalid on 2022/05/08 11:46
upstream KCSAN: data-race in __mod_timer / blk_add_timer (7) block 2 308d 325d 0/26 auto-obsoleted due to no activity on 2023/07/28 08:54
upstream KCSAN: data-race in __mod_timer / blk_add_timer (5) block 1 610d 610d 0/26 auto-closed as invalid on 2022/09/29 13:43
upstream KCSAN: data-race in __mod_timer / blk_add_timer (8) block 7 101d 139d 0/26 auto-obsoleted due to no activity on 2024/02/20 17:38

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __mod_timer / blk_add_timer

write to 0xffff8881019ee408 of 8 bytes by task 11142 on cpu 1:
 __mod_timer+0x721/0xbe0 kernel/time/timer.c:1050
 mod_timer+0x1b/0x20 kernel/time/timer.c:1106
 blk_add_timer+0x191/0x1a0 block/blk-timeout.c:164
 blk_mq_start_request+0x115/0x1b0 block/blk-mq.c:727
 loop_queue_rq+0x3b/0x120 drivers/block/loop.c:2005
 blk_mq_dispatch_rq_list+0x628/0x10b0 block/blk-mq.c:1379
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:191 [inline]
 blk_mq_do_dispatch_sched+0x3cb/0x660 block/blk-mq-sched.c:204
 __blk_mq_sched_dispatch_requests+0x21e/0x2c0 block/blk-mq-sched.c:320
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:351
 __blk_mq_run_hw_queue+0xbc/0x140 block/blk-mq.c:1499
 __blk_mq_delay_run_hw_queue+0x163/0x2f0 block/blk-mq.c:1576
 blk_mq_run_hw_queue+0x22c/0x250 block/blk-mq.c:1629
 blk_mq_sched_insert_requests+0x13f/0x200 block/blk-mq-sched.c:503
 blk_mq_flush_plug_list+0x2f5/0x3c0 block/blk-mq.c:1954
 blk_flush_plug_list+0x235/0x260 block/blk-core.c:1747
 blk_finish_plug+0x44/0x60 block/blk-core.c:1764
 read_pages+0x2d9/0x530 mm/readahead.c:150
 page_cache_ra_unbounded+0x3c8/0x410 mm/readahead.c:238
 do_page_cache_ra mm/readahead.c:267 [inline]
 force_page_cache_ra+0x246/0x280 mm/readahead.c:299
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:573
 page_cache_sync_readahead include/linux/pagemap.h:879 [inline]
 filemap_get_pages mm/filemap.c:2467 [inline]
 filemap_read+0x388/0x1230 mm/filemap.c:2550
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1732
 call_read_iter include/linux/fs.h:2108 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881019ee408 of 8 bytes by task 853 on cpu 0:
 blk_add_timer+0x125/0x1a0 include/linux/list.h:821
 blk_mq_start_request+0x115/0x1b0 block/blk-mq.c:727
 loop_queue_rq+0x3b/0x120 drivers/block/loop.c:2005
 blk_mq_dispatch_rq_list+0x628/0x10b0 block/blk-mq.c:1379
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:191 [inline]
 blk_mq_do_dispatch_sched+0x3cb/0x660 block/blk-mq-sched.c:204
 __blk_mq_sched_dispatch_requests+0x21e/0x2c0 block/blk-mq-sched.c:320
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:351
 __blk_mq_run_hw_queue+0xbc/0x140 block/blk-mq.c:1499
 blk_mq_run_work_fn+0x3d/0x50 block/blk-mq.c:1831
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2275
 worker_thread+0x636/0xae0 kernel/workqueue.c:2421
 kthread+0x1d0/0x1f0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 853 Comm: kworker/0:1H Not tainted 5.13.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: kblockd blk_mq_run_work_fn
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/21 00:07 upstream f01da525b3de 3c7fef33 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __mod_timer / blk_add_timer
2021/04/16 18:34 upstream 2f7b98d1e55c 7e2b734b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __mod_timer / blk_add_timer
* Struck through repros no longer work on HEAD.