syzbot


KCSAN: data-race in rq_depth_scale_up / wbt_wait

Status: auto-closed as invalid on 2021/01/05 18:13
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+c1a1e3bf3d128ef344c5@syzkaller.appspotmail.com
First crash: 1233d, last: 1233d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in rq_depth_scale_up / wbt_wait (2) block 1 1180d 1180d 0/26 auto-closed as invalid on 2021/02/27 23:37

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

read-write to 0xffff888141e799e4 of 4 bytes by interrupt on cpu 1:
 rq_depth_scale_up+0x4a/0x180 block/blk-rq-qos.c:172
 scale_up block/blk-wbt.c:311 [inline]
 wb_timer_fn+0xd4/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:1410
 expire_timers+0x116/0x260 kernel/time/timer.c:1455
 __run_timers+0x338/0x3d0 kernel/time/timer.c:1747
 run_timer_softirq+0x19/0x30 kernel/time/timer.c:1760
 __do_softirq+0x12c/0x2b1 kernel/softirq.c:298
 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:393 [inline]
 __irq_exit_rcu+0xb2/0xc0 kernel/softirq.c:423
 sysvec_apic_timer_interrupt+0x74/0x90 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631
 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
 arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline]
 kcsan_setup_watchpoint+0x1ec/0x4d0 kernel/kcsan/core.c:591
 mem_cgroup_lruvec include/linux/memcontrol.h:487 [inline]
 __mod_lruvec_page_state include/linux/memcontrol.h:846 [inline]
 __dec_lruvec_page_state include/linux/memcontrol.h:1346 [inline]
 page_remove_rmap+0x159/0x2f0 mm/rmap.c:1349
 zap_pte_range+0x5af/0x13c0 mm/memory.c:1253
 zap_pmd_range mm/memory.c:1357 [inline]
 zap_pud_range mm/memory.c:1386 [inline]
 zap_p4d_range mm/memory.c:1407 [inline]
 unmap_page_range+0x560/0x660 mm/memory.c:1428
 unmap_single_vma+0x157/0x210 mm/memory.c:1473
 unmap_vmas+0xbf/0x150 mm/memory.c:1505
 exit_mmap+0x1c7/0x3b0 mm/mmap.c:3222
 __mmput+0xa2/0x220 kernel/fork.c:1079
 mmput+0x38/0x40 kernel/fork.c:1100
 exit_mm+0x307/0x370 kernel/exit.c:486
 do_exit+0x3c8/0x1630 kernel/exit.c:796
 do_group_exit+0xc8/0x170 kernel/exit.c:906
 get_signal+0xf9b/0x1510 kernel/signal.c:2758
 arch_do_signal+0x25/0x260 arch/x86/kernel/signal.c:811
 exit_to_user_mode_loop kernel/entry/common.c:161 [inline]
 exit_to_user_mode_prepare+0xde/0x170 kernel/entry/common.c:191
 syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:266
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888141e799e4 of 4 bytes by task 16029 on cpu 0:
 rwb_arm_timer block/blk-wbt.c:332 [inline]
 wbt_wait+0x1f1/0x2b0 block/blk-wbt.c:586
 __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+0x233/0x1020 block/blk-mq.c:2174
 __submit_bio_noacct_mq block/blk-core.c:1026 [inline]
 submit_bio_noacct+0x77d/0x930 block/blk-core.c:1059
 submit_bio+0x1f3/0x360 block/blk-core.c:1129
 submit_bh_wbc+0x38c/0x3d0 fs/buffer.c:3054
 __block_write_full_page+0x618/0x9e0 fs/buffer.c:1810
 block_write_full_page+0x15d/0x190 fs/buffer.c:2980
 blkdev_writepage+0x20/0x30 fs/block_dev.c:627
 __writepage+0x32/0xc0 mm/page-writeback.c:2311
 write_cache_pages+0x4bc/0x7f0 mm/page-writeback.c:2246
 generic_writepages+0x64/0xa0 mm/page-writeback.c:2337
 blkdev_writepages+0x19/0x20 fs/block_dev.c:1946
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 __filemap_fdatawrite mm/filemap.c:430 [inline]
 filemap_flush+0x1f/0x30 mm/filemap.c:457
 __sync_blockdev+0x69/0x70 fs/block_dev.c:508
 __sync_filesystem fs/sync.c:40 [inline]
 sync_filesystem+0xcb/0x160 fs/sync.c:64
 generic_shutdown_super+0x3c/0x1f0 fs/super.c:448
 kill_block_super+0x4a/0x90 fs/super.c:1446
 deactivate_locked_super+0x6a/0xb0 fs/super.c:335
 deactivate_super+0x85/0x90 fs/super.c:366
 cleanup_mnt+0x277/0x2e0 fs/namespace.c:1118
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1125
 task_work_run+0x8e/0x110 kernel/task_work.c:151
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:164 [inline]
 exit_to_user_mode_prepare+0x13c/0x170 kernel/entry/common.c:191
 syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:266
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16029 Comm: syz-executor.4 Not tainted 5.10.0-rc6-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
2020/12/01 18:13 upstream b65054597872 07bfe8a5 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.