syzbot


KCSAN: data-race in wb_timer_fn / wbt_issue (2)

Status: auto-closed as invalid on 2020/10/24 23:26
Subsystems: block
[Documentation on labels]
First crash: 1825d, last: 1821d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wb_timer_fn / wbt_issue block 6 1 1899d 1899d 0/29 auto-closed as invalid on 2020/08/07 08:16
upstream KCSAN: data-race in wb_timer_fn / wbt_issue (4) block 6 1 1722d 1722d 0/29 auto-closed as invalid on 2021/01/31 06:34
upstream KCSAN: data-race in wb_timer_fn / wbt_issue (3) block 6 1 1758d 1742d 0/29 auto-closed as invalid on 2020/12/27 00:57

Sample crash report:
==================================================================
BUG: KCSAN: data-race in wb_timer_fn / wbt_issue

write to 0xffff8881289d0804 of 4 bytes by interrupt on cpu 0:
 calc_wb_limits block/blk-wbt.c:304 [inline]
 scale_up block/blk-wbt.c:313 [inline]
 wb_timer_fn+0x42d/0xa40 block/blk-wbt.c:382
 blk_stat_timer_fn+0x3f4/0x410 block/blk-stat.c:99
 call_timer_fn+0x30/0x2a0 kernel/time/timer.c:1413
 expire_timers+0x116/0x290 kernel/time/timer.c:1458
 __run_timers+0x348/0x3e0 kernel/time/timer.c:1755
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1768
 __do_softirq+0x198/0x360 kernel/softirq.c:298
 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
 do_softirq_own_stack+0x5d/0x80 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:393 [inline]
 __irq_exit_rcu+0x115/0x120 kernel/softirq.c:423
 sysvec_apic_timer_interrupt+0xba/0xd0 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
 mark_page_accessed+0xbb/0x340 mm/swap.c:428
 pagecache_get_page+0x76d/0x970 mm/filemap.c:1793
 find_get_page_flags include/linux/pagemap.h:304 [inline]
 __find_get_block_slow+0x61/0x3b0 fs/buffer.c:202
 __find_get_block+0x1a7/0x760 fs/buffer.c:1328
 __getblk_gfp+0x28/0x1f0 fs/buffer.c:1350
 sb_getblk include/linux/buffer_head.h:325 [inline]
 ext4_getblk fs/ext4/inode.c:839 [inline]
 ext4_bread_batch+0x112/0x520 fs/ext4/inode.c:902
 __ext4_find_entry+0x8f0/0xe40 fs/ext4/namei.c:1523
 ext4_lookup_entry fs/ext4/namei.c:1623 [inline]
 ext4_lookup+0x1a0/0x660 fs/ext4/namei.c:1691
 __lookup_hash+0xbf/0x180 fs/namei.c:1445
 filename_create+0xdb/0x3c0 fs/namei.c:3467
 user_path_create fs/namei.c:3524 [inline]
 do_symlinkat+0x69/0x280 fs/namei.c:3979
 __do_sys_symlink fs/namei.c:4005 [inline]
 __se_sys_symlink fs/namei.c:4003 [inline]
 __x64_sys_symlink+0x32/0x40 fs/namei.c:4003
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8881289d0804 of 4 bytes by task 3256 on cpu 1:
 rwb_enabled block/blk-wbt.c:80 [inline]
 wbt_issue+0x20/0xd0 block/blk-wbt.c:599
 __rq_qos_issue+0x3b/0x70 block/blk-rq-qos.c:54
 rq_qos_issue block/blk-rq-qos.h:159 [inline]
 blk_mq_start_request+0xd2/0x260 block/blk-mq.c:740
 scsi_mq_prep_fn drivers/scsi/scsi_lib.c:1589 [inline]
 scsi_queue_rq+0xbca/0x1430 drivers/scsi/scsi_lib.c:1646
 blk_mq_dispatch_rq_list+0x512/0xd10 block/blk-mq.c:1387
 __blk_mq_sched_dispatch_requests+0x1e7/0x2a0 block/blk-mq-sched.c:323
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:356
 __blk_mq_run_hw_queue+0xee/0x1c0 block/blk-mq.c:1534
 __blk_mq_delay_run_hw_queue+0x199/0x340 block/blk-mq.c:1611
 blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1664
 blk_mq_run_hw_queues block/blk-mq.c:1682 [inline]
 blk_mq_requeue_work+0x423/0x490 block/blk-mq.c:816
 process_one_work+0x3e1/0x9a0 kernel/workqueue.c:2269
 worker_thread+0x665/0xbe0 kernel/workqueue.c:2415
 kthread+0x20d/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

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

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/19 23:16 upstream eb5f95f1593f 53ce8104 .config console log report info ci2-upstream-kcsan-gce
2020/09/16 02:39 upstream fc4f28bb3daf 18d7d030 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.