syzbot


KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu (7)

Status: moderation: reported on 2025/01/27 02:51
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+8dabb8e6a4061bf822c6@syzkaller.appspotmail.com
First crash: 66d, last: 27d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu (3) fs mm 3 1380d 1413d 0/28 auto-closed as invalid on 2021/07/27 20:37
upstream KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu (5) fs mm 1 674d 674d 0/28 auto-obsoleted due to no activity on 2023/07/03 22:15
upstream KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu (4) fs mm 1 1323d 1323d 0/28 auto-closed as invalid on 2021/09/23 01:41
upstream KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu (6) fs mm 1 283d 283d 0/28 auto-obsoleted due to no activity on 2024/07/29 11:04
upstream KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu (2) fs mm 1 1564d 1564d 0/28 auto-closed as invalid on 2021/01/25 01:30
upstream KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu fs mm 1 1620d 1620d 0/28 auto-closed as invalid on 2020/11/29 19:57

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

write to 0xffff888100fbc9c8 of 4 bytes by task 1428 on cpu 0:
 fprop_reflect_period_percpu+0x170/0x1a0 lib/flex_proportions.c:134
 fprop_fraction_percpu+0x77/0x150 lib/flex_proportions.c:156
 __wb_calc_thresh+0x8b/0x290 mm/page-writeback.c:935
 wb_bg_dirty_limits mm/page-writeback.c:2162 [inline]
 domain_over_bg_thresh+0x22c/0x300 mm/page-writeback.c:2176
 wb_over_bg_thresh+0xb3/0x110 mm/page-writeback.c:2197
 wb_check_background_flush fs/fs-writeback.c:2218 [inline]
 wb_do_writeback fs/fs-writeback.c:2316 [inline]
 wb_workfn+0x643/0x940 fs/fs-writeback.c:2343
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4db/0xa20 kernel/workqueue.c:3319
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3400
 kthread+0x4ae/0x520 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888100fbc9c8 of 4 bytes by task 3297 on cpu 1:
 fprop_reflect_period_percpu+0x32/0x1a0 lib/flex_proportions.c:115
 __fprop_add_percpu lib/flex_proportions.c:142 [inline]
 __fprop_add_percpu_max+0x58/0x180 lib/flex_proportions.c:200
 wb_domain_writeout_add mm/page-writeback.c:584 [inline]
 __wb_writeout_add+0x77/0x1d0 mm/page-writeback.c:608
 __folio_end_writeback+0x20d/0x490 mm/page-writeback.c:3084
 folio_end_writeback+0xca/0x3c0 mm/filemap.c:1649
 __block_write_full_folio+0x5bf/0x8c0 fs/buffer.c:1920
 block_write_full_folio+0x293/0x2b0
 write_cache_pages+0x62/0x100 mm/page-writeback.c:2644
 blkdev_writepages+0x59/0x90 block/fops.c:458
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2687
 filemap_fdatawrite_wbc mm/filemap.c:389 [inline]
 __filemap_fdatawrite_range mm/filemap.c:422 [inline]
 __filemap_fdatawrite mm/filemap.c:428 [inline]
 filemap_flush+0xe7/0x120 mm/filemap.c:473
 sync_blockdev_nowait+0x29/0x40 block/bdev.c:206
 sync_filesystem+0xe3/0x190 fs/sync.c:60
 generic_shutdown_super+0x46/0x220 fs/super.c:621
 kill_block_super+0x2a/0x70 fs/super.c:1710
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1413
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1420
 task_work_run+0x13a/0x1a0 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xa8/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000025 -> 0x00000026

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3297 Comm: syz-executor Tainted: G        W          6.14.0-rc5-syzkaller-00109-g0f52fd4f67c6 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/07 12:26 upstream 0f52fd4f67c6 831e3629 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu
2025/02/04 07:48 upstream 0de63bb7d919 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu
2025/01/27 02:50 upstream c2da8b3f914f 9fbd772e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fprop_reflect_period_percpu / fprop_reflect_period_percpu
* Struck through repros no longer work on HEAD.