syzbot


KCSAN: data-race in __wb_writeout_add / writeout_period (3)

Status: auto-closed as invalid on 2022/09/20 00:41
Subsystems: fs mm
[Documentation on labels]
First crash: 612d, last: 612d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __wb_writeout_add / writeout_period (2) mm fs 2 655d 663d 0/26 auto-closed as invalid on 2022/08/08 01:40
upstream KCSAN: data-race in __wb_writeout_add / writeout_period mm fs 2 712d 737d 0/26 auto-closed as invalid on 2022/06/12 20:11
upstream KCSAN: data-race in __wb_writeout_add / writeout_period (4) fs mm 141 8d14h 133d 0/26 moderation: reported on 2023/12/08 00:07

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __wb_writeout_add / writeout_period

write to 0xffffffff870c7420 of 8 bytes by interrupt on cpu 1:
 writeout_period+0xa6/0xe0 mm/page-writeback.c:613
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1474
 expire_timers+0x116/0x240 kernel/time/timer.c:1519
 __run_timers+0x350/0x400 kernel/time/timer.c:1790
 run_timer_softirq+0x56/0x60 kernel/time/timer.c:1805
 __do_softirq+0x158/0x2e3 kernel/softirq.c:571
 __irq_exit_rcu kernel/softirq.c:650 [inline]
 irq_exit_rcu+0x41/0x70 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x16/0x20
 _compound_head include/linux/page-flags.h:253 [inline]
 PageAnon include/linux/page-flags.h:663 [inline]
 zap_pte_range+0x488/0x1560 mm/memory.c:1444
 zap_pmd_range mm/memory.c:1575 [inline]
 zap_pud_range mm/memory.c:1604 [inline]
 zap_p4d_range mm/memory.c:1625 [inline]
 unmap_page_range+0x3ac/0x730 mm/memory.c:1646
 unmap_single_vma+0x157/0x230 mm/memory.c:1694
 unmap_vmas+0xdf/0x1a0 mm/memory.c:1731
 exit_mmap+0x11f/0x380 mm/mmap.c:3113
 __mmput+0x27/0x1b0 kernel/fork.c:1187
 mmput+0x3d/0x50 kernel/fork.c:1208
 exit_mm+0xdb/0x170 kernel/exit.c:510
 do_exit+0x525/0x16e0 kernel/exit.c:782
 do_group_exit+0xa5/0x160 kernel/exit.c:925
 get_signal+0xf54/0x1020 kernel/signal.c:2857
 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:166
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffffffff870c7420 of 8 bytes by task 1949 on cpu 0:
 wb_domain_writeout_add mm/page-writeback.c:562 [inline]
 __wb_writeout_add+0x8a/0x1d0 mm/page-writeback.c:583
 __folio_end_writeback+0x2f4/0x540 mm/page-writeback.c:2927
 folio_end_writeback+0x57/0x130 mm/filemap.c:1620
 end_page_writeback+0x3b/0xe0 mm/folio-compat.c:26
 ext4_finish_bio+0x421/0x520 fs/ext4/page-io.c:145
 ext4_release_io_end+0x98/0x200 fs/ext4/page-io.c:160
 ext4_end_io_end fs/ext4/page-io.c:194 [inline]
 ext4_do_flush_completed_IO fs/ext4/page-io.c:259 [inline]
 ext4_end_io_rsv_work+0x319/0x3a0 fs/ext4/page-io.c:273
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

value changed: 0x000000010000101f -> 0x000000010000114b

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1949 Comm: kworker/u4:6 Not tainted 5.19.0-syzkaller-13930-g7ebfc85e2cd7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/16 00:36 upstream 7ebfc85e2cd7 7a7cb304 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __wb_writeout_add / writeout_period
* Struck through repros no longer work on HEAD.