syzbot


KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (5)

Status: auto-closed as invalid on 2021/09/04 07:15
Subsystems: fs mm
[Documentation on labels]
First crash: 939d, last: 938d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (7) fs mm 5 610d 690d 0/26 auto-closed as invalid on 2022/07/28 18:16
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (2) fs mm 2 1193d 1174d 0/26 auto-closed as invalid on 2020/12/23 11:14
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (3) fs mm 2 1115d 1147d 0/26 auto-closed as invalid on 2021/03/11 15:36
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (6) fs mm 1 729d 729d 0/26 auto-closed as invalid on 2022/04/01 06:25
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (9) fs mm 8 199d 281d 0/26 auto-obsoleted due to no activity on 2023/09/13 06:09
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (8) fs mm 20 325d 525d 0/26 auto-obsoleted due to no activity on 2023/05/10 03:18
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu fs mm 1 1262d 1262d 0/26 auto-closed as invalid on 2020/10/15 13:11
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (4) fs mm 3 1002d 1070d 0/26 auto-closed as invalid on 2021/07/02 00:21
upstream KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (10) fs mm 26 12d 76d 0/26 moderation: reported on 2023/12/10 00:01

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu

write to 0xffffffff8418d388 of 4 bytes by interrupt on cpu 1:
 fprop_new_period+0x100/0x180 lib/flex_proportions.c:83
 writeout_period+0x55/0xe0 mm/page-writeback.c:622
 call_timer_fn+0x2e/0x1d0 kernel/time/timer.c:1419
 expire_timers+0x135/0x250 kernel/time/timer.c:1464
 __run_timers+0x358/0x420 kernel/time/timer.c:1732
 run_timer_softirq+0x2d/0x30 kernel/time/timer.c:1747
 __do_softirq+0x12c/0x26e kernel/softirq.c:558
 invoke_softirq kernel/softirq.c:432 [inline]
 __irq_exit_rcu+0x9a/0xb0 kernel/softirq.c:636
 sysvec_apic_timer_interrupt+0x69/0x80 arch/x86/kernel/apic/apic.c:1100
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
 _raw_spin_unlock_irqrestore+0x34/0x40 kernel/locking/spinlock.c:192
 spin_unlock_irqrestore include/linux/spinlock.h:409 [inline]
 delete_from_page_cache_batch+0x56b/0x690 mm/filemap.c:350
 truncate_inode_pages_range+0x1a5/0xa70 mm/truncate.c:326
 truncate_inode_pages mm/truncate.c:424 [inline]
 truncate_pagecache+0x4f/0x70 mm/truncate.c:736
 ext4_setattr+0xa21/0xec0 fs/ext4/inode.c:5498
 notify_change+0x8a3/0xa80 fs/attr.c:398
 do_truncate+0xe8/0x130 fs/open.c:64
 handle_truncate fs/namei.c:3030 [inline]
 do_open fs/namei.c:3378 [inline]
 path_openat+0x19b2/0x1f20 fs/namei.c:3507
 do_filp_open+0xe9/0x200 fs/namei.c:3534
 do_sys_openat2+0xa3/0x250 fs/open.c:1204
 do_sys_open fs/open.c:1220 [inline]
 __do_sys_creat fs/open.c:1294 [inline]
 __se_sys_creat fs/open.c:1288 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1288
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffffff8418d388 of 4 bytes by task 30930 on cpu 0:
 fprop_reflect_period_percpu+0x22/0x1a0 lib/flex_proportions.c:192
 __fprop_inc_percpu lib/flex_proportions.c:222 [inline]
 __fprop_inc_percpu_max+0x3f/0x1f0 lib/flex_proportions.c:271
 wb_domain_writeout_inc mm/page-writeback.c:569 [inline]
 __wb_writeout_inc mm/page-writeback.c:593 [inline]
 test_clear_page_writeback+0x37b/0x560 mm/page-writeback.c:2754
 end_page_writeback+0xd7/0x1b0 mm/filemap.c:1548
 ext4_finish_bio+0x3e2/0x430 fs/ext4/page-io.c:143
 ext4_release_io_end+0x98/0x200 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+0x306/0x360 fs/ext4/page-io.c:271
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

value changed: 0x00000211 -> 0x00000212

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 30930 Comm: kworker/u4:12 Tainted: G        W         5.14.0-rc3-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 (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/31 07:11 upstream 4669e13cd67f 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu
2021/07/30 15:58 upstream 764a5bc89b12 c585c7b0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu
* Struck through repros no longer work on HEAD.