syzbot


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

Status: auto-closed as invalid on 2021/02/18 01:51
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 594d, last: 579d
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 (4) 1 541d 541d 0/23 auto-closed as invalid on 2021/03/28 18:43

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

write to 0xffff888141d6f304 of 4 bytes by interrupt on cpu 1:
 calc_wb_limits block/blk-wbt.c:304 [inline]
 scale_up block/blk-wbt.c:313 [inline]
 wb_timer_fn+0x54a/0xa00 block/blk-wbt.c:374
 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+0x338/0x3d0 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:1096
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628
 vm_normal_page+0x68/0x1b0 mm/memory.c:600
 copy_present_pte mm/memory.c:860 [inline]
 copy_pte_range+0x403/0x1ab0 mm/memory.c:978
 copy_pmd_range mm/memory.c:1058 [inline]
 copy_pud_range mm/memory.c:1095 [inline]
 copy_p4d_range mm/memory.c:1119 [inline]
 copy_page_range+0x85e/0xb30 mm/memory.c:1192
 dup_mmap+0x75e/0xa90 kernel/fork.c:594
 dup_mm+0x7c/0x210 kernel/fork.c:1361
 copy_mm kernel/fork.c:1417 [inline]
 copy_process+0x125c/0x2da0 kernel/fork.c:2099
 kernel_clone+0x14b/0x680 kernel/fork.c:2464
 __do_sys_clone kernel/fork.c:2581 [inline]
 __se_sys_clone kernel/fork.c:2565 [inline]
 __x64_sys_clone+0xc8/0xf0 kernel/fork.c:2565
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888141d6f304 of 4 bytes by task 23607 on cpu 0:
 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+0x229/0x1000 block/blk-mq.c:2158
 __submit_bio_noacct_mq block/blk-core.c:1028 [inline]
 submit_bio_noacct+0x75d/0x910 block/blk-core.c:1061
 submit_bio+0x1f3/0x350 block/blk-core.c:1131
 submit_bio_wait+0x79/0xc0 block/bio.c:1154
 blkdev_issue_flush+0xc9/0xe0 block/blk-flush.c:449
 fat_file_fsync+0xec/0x100 fs/fat/file.c:198
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2737 [inline]
 generic_file_write_iter+0x103/0x130 mm/filemap.c:3573
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4b0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x42a/0x780 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+0x5db/0xca0 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/0xa9

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

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/01/14 01:42 upstream 65f0d2414b70 269d24e8 .config log report info
ci2-upstream-kcsan-gce 2020/12/30 07:43 upstream 139711f033f6 0fa352f2 .config log report info