syzbot


KCSAN: data-race in calc_wb_limits.part.0 / wbt_wait (2)

Status: auto-closed as invalid on 2020/02/06 18:57
Subsystems: block
[Documentation on labels]
First crash: 1611d, last: 1611d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in calc_wb_limits.part.0 / wbt_wait block 4 1628d 1637d 0/26 closed as invalid on 2019/11/19 14:54
upstream KCSAN: data-race in calc_wb_limits.part.0 / wbt_wait (3) block 9 1430d 1538d 0/26 closed as invalid on 2020/06/18 14:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in calc_wb_limits.part.0 / wbt_wait

write to 0xffff88821aa22d04 of 4 bytes by interrupt on cpu 0:
 calc_wb_limits.part.0+0x7b/0xb0 block/blk-wbt.c:304
 calc_wb_limits block/blk-wbt.c:298 [inline]
 scale_up block/blk-wbt.c:313 [inline]
 scale_up+0x7f/0x250 block/blk-wbt.c:309
 wb_timer_fn+0x2cd/0xad0 block/blk-wbt.c:393
 blk_stat_timer_fn+0x3b0/0x3d0 block/blk-stat.c:98
 call_timer_fn+0x5f/0x2f0 kernel/time/timer.c:1404
 expire_timers kernel/time/timer.c:1449 [inline]
 __run_timers kernel/time/timer.c:1773 [inline]
 __run_timers kernel/time/timer.c:1740 [inline]
 run_timer_softirq+0xc0c/0xcd0 kernel/time/timer.c:1786
 __do_softirq+0x115/0x33f kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0xbb/0xe0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:536 [inline]
 smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 __sanitizer_cov_trace_pc+0x1/0x50 kernel/kcov.c:95
 tomoyo_supervisor+0x22b/0xd20 security/tomoyo/common.c:2087
 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline]
 tomoyo_path_number_perm+0x323/0x3c0 security/tomoyo/file.c:734
 tomoyo_path_mknod+0xe6/0x150 security/tomoyo/tomoyo.c:246
 security_path_mknod+0xc6/0x100 security/security.c:1021
 may_o_create fs/namei.c:3016 [inline]
 lookup_open fs/namei.c:3177 [inline]
 do_last fs/namei.c:3314 [inline]
 path_openat+0x18f9/0x36e0 fs/namei.c:3525
 do_filp_open+0x11e/0x1b0 fs/namei.c:3555
 do_sys_open+0x3b3/0x4f0 fs/open.c:1097
 __do_sys_open fs/open.c:1115 [inline]
 __se_sys_open fs/open.c:1110 [inline]
 __x64_sys_open+0x55/0x70 fs/open.c:1110
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88821aa22d04 of 4 bytes by task 16852 on cpu 1:
 rwb_enabled block/blk-wbt.c:80 [inline]
 bio_to_wbt_flags block/blk-wbt.c:551 [inline]
 wbt_wait+0x52/0x250 block/blk-wbt.c:584
 __rq_qos_throttle+0x47/0x70 block/blk-rq-qos.c:72
 rq_qos_throttle block/blk-rq-qos.h:182 [inline]
 blk_mq_make_request+0x29c/0xf60 block/blk-mq.c:1971
 generic_make_request block/blk-core.c:1064 [inline]
 generic_make_request+0x196/0x740 block/blk-core.c:1006
 submit_bio+0x96/0x3c0 block/blk-core.c:1190
 mpage_bio_submit fs/mpage.c:66 [inline]
 mpage_readpages+0x36c/0x3c0 fs/mpage.c:410
 blkdev_readpages+0x36/0x50 fs/block_dev.c:620
 read_pages+0xa2/0x2d0 mm/readahead.c:126
 __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:2010
 call_read_iter include/linux/fs.h:1889 [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/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16852 Comm: blkid Not tainted 5.4.0-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
2019/11/28 18:57 https://github.com/google/ktsan.git kcsan ef798c30ba4e 97264cb1 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.