syzbot


KCSAN: data-race in wb_timer_fn / wbt_wait (4)

Status: auto-closed as invalid on 2021/03/28 18:43
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 541d, last: 541d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wb_timer_fn / wbt_wait (5) 1 504d 504d 0/23 auto-closed as invalid on 2021/05/17 09:11
upstream KCSAN: data-race in wb_timer_fn / wbt_wait 1 778d 778d 0/23 auto-closed as invalid on 2020/08/03 14:15
upstream KCSAN: data-race in wb_timer_fn / wbt_wait (2) 8 634d 617d 0/23 auto-closed as invalid on 2020/12/25 09:31
upstream KCSAN: data-race in wb_timer_fn / wbt_wait (3) 2 579d 594d 0/23 auto-closed as invalid on 2021/02/18 01:51

Sample crash report:
loop5: detected capacity change from 264192 to 0
FAT-fs (loop5): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1)
==================================================================
BUG: KCSAN: data-race in wb_timer_fn / wbt_wait

write to 0xffff888102bfd204 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+0x42a/0xa00 block/blk-wbt.c:382
 blk_stat_timer_fn+0x3f4/0x410 block/blk-stat.c:99
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1417
 expire_timers+0x116/0x260 kernel/time/timer.c:1462
 __run_timers+0x358/0x3f0 kernel/time/timer.c:1731
 run_timer_softirq+0x19/0x30 kernel/time/timer.c:1744
 __do_softirq+0x13c/0x2c3 kernel/softirq.c:343
 asm_call_irq_on_stack+0xf/0x20
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
 do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:226 [inline]
 __irq_exit_rcu+0xb4/0xc0 kernel/softirq.c:420
 sysvec_apic_timer_interrupt+0x74/0x90 arch/x86/kernel/apic/apic.c:1100
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
 preempt_count arch/x86/include/asm/preempt.h:26 [inline]
 get_ctx kernel/kcsan/core.c:198 [inline]
 check_access kernel/kcsan/core.c:629 [inline]
 __tsan_read4+0xf0/0x180 kernel/kcsan/core.c:841
 wq_worker_sleeping+0x22/0x120 kernel/workqueue.c:875
 sched_submit_work kernel/sched/core.c:5123 [inline]
 schedule+0x33/0xb0 kernel/sched/core.c:5154
 worker_thread+0x8f8/0xa70 kernel/workqueue.c:2442
 kthread+0x20b/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffff888102bfd204 of 4 bytes by task 20354 on cpu 1:
 rwb_enabled block/blk-wbt.c:80 [inline]
 bio_to_wbt_flags block/blk-wbt.c:543 [inline]
 wbt_wait+0x36/0x2b0 block/blk-wbt.c:576
 __rq_qos_throttle+0x39/0x70 block/blk-rq-qos.c:72
 rq_qos_throttle block/blk-rq-qos.h:182 [inline]
 blk_mq_submit_bio+0x240/0x1040 block/blk-mq.c:2158
 __submit_bio_noacct_mq block/blk-core.c:1028 [inline]
 submit_bio_noacct+0x78d/0x960 block/blk-core.c:1061
 submit_bio+0x200/0x360 block/blk-core.c:1131
 ext4_io_submit+0xcd/0xf0 fs/ext4/page-io.c:379
 ext4_writepages+0x68e/0x1e70 fs/ext4/inode.c:2759
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2737 [inline]
 ext4_buffered_write_iter+0x38f/0x3e0 fs/ext4/file.c:278
 ext4_file_write_iter+0x47a/0x1060 fs/ext4/file.c:503
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x41a/0x770 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5e0/0xcf0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20354 Comm: syz-executor.5 Not tainted 5.11.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/02/21 18:40 upstream 55f62bc87347 a659b3f1 .config log report info KCSAN: data-race in wb_timer_fn / wbt_wait