syzbot


KCSAN: data-race in __folio_end_writeback / writeout_period

Status: auto-closed as invalid on 2022/02/28 10:56
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 399d, last: 317d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __folio_end_writeback / writeout_period (2) 1 257d 257d 0/24 auto-closed as invalid on 2022/04/29 05:10

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

write to 0xffffffff86de82e0 of 8 bytes by interrupt on cpu 1:
 writeout_period+0xa6/0xe0 mm/page-writeback.c:623
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1421
 expire_timers+0x116/0x240 kernel/time/timer.c:1466
 __run_timers+0x368/0x410 kernel/time/timer.c:1734
 run_timer_softirq+0x56/0x60 kernel/time/timer.c:1749
 __do_softirq+0x158/0x2de kernel/softirq.c:558
 __irq_exit_rcu kernel/softirq.c:637 [inline]
 irq_exit_rcu+0x37/0x70 kernel/softirq.c:649
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1097
 asm_sysvec_apic_timer_interrupt+0x12/0x20
 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
 acpi_safe_halt drivers/acpi/processor_idle.c:110 [inline]
 acpi_idle_do_entry drivers/acpi/processor_idle.c:551 [inline]
 acpi_idle_enter+0x282/0x300 drivers/acpi/processor_idle.c:687
 cpuidle_enter_state+0x2b4/0x7d0 drivers/cpuidle/cpuidle.c:237
 cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:351
 call_cpuidle kernel/sched/idle.c:158 [inline]
 cpuidle_idle_call kernel/sched/idle.c:239 [inline]
 do_idle+0x1b2/0x250 kernel/sched/idle.c:306
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:403
 secondary_startup_64_no_verify+0xc4/0xcb

read to 0xffffffff86de82e0 of 8 bytes by task 14300 on cpu 0:
 wb_domain_writeout_add mm/page-writeback.c:572 [inline]
 __wb_writeout_add mm/page-writeback.c:593 [inline]
 __folio_end_writeback+0x2b3/0x580 mm/page-writeback.c:2825
 folio_end_writeback+0x57/0x130 mm/filemap.c:1644
 end_page_writeback+0x37/0x50 mm/folio-compat.c:25
 ext4_finish_bio+0x30e/0x360 fs/ext4/page-io.c:143
 ext4_release_io_end+0x5f/0x140 fs/ext4/page-io.c:158
 ext4_end_io_end fs/ext4/page-io.c:192 [inline]
 ext4_do_flush_completed_IO fs/ext4/page-io.c:257 [inline]
 ext4_end_io_rsv_work+0x1f6/0x240 fs/ext4/page-io.c:271
 process_one_work+0x3f6/0x960 kernel/workqueue.c:2307
 worker_thread+0x616/0xa70 kernel/workqueue.c:2454
 kthread+0x1bf/0x1e0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30

value changed: 0x0000000100033ed8 -> 0x0000000100034004

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 14300 Comm: kworker/u4:3 Not tainted 5.17.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work
==================================================================

Crashes (10):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/01/24 10:56 upstream dd81e1c7d5fb 214351e1 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2022/01/11 22:22 upstream 6f38be8f2ccd 44d1319a .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/12/24 18:03 upstream 7a29b11da965 6caa12e4 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/12/23 04:57 upstream bc491fb12513 6caa12e4 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/12/12 20:08 upstream 90d9fbc16b69 49ca1f59 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/12/12 03:33 upstream 6f513529296f 49ca1f59 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/12/07 23:59 upstream cd8c917a56f2 0230ba3e .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/11/25 03:21 upstream 5f53fa508db0 545ab074 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/11/23 22:00 upstream 136057256686 545ab074 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
ci2-upstream-kcsan-gce 2021/11/03 12:16 upstream 56d33754481f 17f3edd2 .config log report info KCSAN: data-race in __folio_end_writeback / writeout_period
* Struck through repros no longer work on HEAD.