syzbot


KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (10)

Status: moderation: reported on 2025/06/22 15:22
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+ade9a83b6ae7a3c3c3fe@syzkaller.appspotmail.com
First crash: 175d, last: 51d
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (3) fs mm 6 2 1820d 1833d 0/29 auto-closed as invalid on 2021/01/24 22:24
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (7) fs mm 6 295 531d 738d 0/29 auto-obsoleted due to no activity on 2024/08/05 19:12
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (9) fs mm 6 5 240d 356d 0/29 auto-obsoleted due to no activity on 2025/06/13 09:22
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (5) fs mm 6 3 1597d 1631d 0/29 auto-closed as invalid on 2021/09/04 14:56
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (4) fs mm 6 6 1675d 1774d 0/29 auto-closed as invalid on 2021/06/18 08:34
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (6) fs mm 6 17 1481d 1558d 0/29 auto-closed as invalid on 2021/12/29 06:33
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (8) fs mm 6 4 452d 494d 0/29 auto-obsoleted due to no activity on 2024/10/23 14:01
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (2) fs mm 6 3 1897d 1936d 0/29 auto-closed as invalid on 2020/11/08 10:33
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch mm fs 6 9 2039d 2198d 0/29 closed as invalid on 2020/06/18 14:24

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

read-write to 0xffff88810118e948 of 8 bytes by interrupt on cpu 0:
 percpu_counter_add_batch+0x110/0x130 lib/percpu_counter.c:107
 wb_stat_mod include/linux/backing-dev.h:66 [inline]
 __wb_writeout_add+0x42/0x1b0 mm/page-writeback.c:585
 __folio_end_writeback+0x14b/0x3b0 mm/page-writeback.c:3003
 folio_end_writeback_no_dropbehind+0x6d/0x1b0 mm/filemap.c:1668
 folio_end_writeback+0x1c/0x70 mm/filemap.c:1694
 ext4_finish_bio+0x459/0x8c0 fs/ext4/page-io.c:144
 ext4_end_bio+0x298/0x3b0 fs/ext4/page-io.c:-1
 bio_endio+0x37e/0x420 block/bio.c:1672
 blk_update_request+0x336/0x730 block/blk-mq.c:998
 blk_mq_end_request+0x26/0x50 block/blk-mq.c:1160
 lo_complete_rq+0x98/0x140 drivers/block/loop.c:314
 blk_complete_reqs block/blk-mq.c:1235 [inline]
 blk_done_softirq+0x77/0xb0 block/blk-mq.c:1240
 handle_softirqs+0xba/0x290 kernel/softirq.c:622
 run_ksoftirqd+0x1c/0x30 kernel/softirq.c:1063
 smpboot_thread_fn+0x32b/0x530 kernel/smpboot.c:160
 kthread+0x489/0x510 kernel/kthread.c:463
 ret_from_fork+0x122/0x1b0 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff88810118e948 of 8 bytes by task 5748 on cpu 1:
 percpu_counter_read include/linux/percpu_counter.h:110 [inline]
 __wb_update_bandwidth+0x98/0x5d0 mm/page-writeback.c:1509
 wb_update_bandwidth mm/page-writeback.c:1536 [inline]
 do_writepages+0x2dd/0x310 mm/page-writeback.c:2627
 filemap_fdatawrite_wbc mm/filemap.c:389 [inline]
 __filemap_fdatawrite_range mm/filemap.c:422 [inline]
 file_write_and_wait_range+0x156/0x2c0 mm/filemap.c:797
 generic_buffers_fsync_noflush+0x45/0x120 fs/buffer.c:609
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x1ab/0x690 fs/ext4/fsync.c:147
 vfs_fsync_range+0x10d/0x130 fs/sync.c:187
 generic_write_sync include/linux/fs.h:3046 [inline]
 ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305
 ext4_file_write_iter+0x387/0xf60 fs/ext4/file.c:-1
 iter_file_splice_write+0x666/0xa60 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x156/0x2a0 fs/splice.c:1161
 splice_direct_to_actor+0x312/0x680 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0xda/0x150 fs/splice.c:1230
 do_sendfile+0x380/0x650 fs/read_write.c:1370
 __do_sys_sendfile64 fs/read_write.c:1431 [inline]
 __se_sys_sendfile64 fs/read_write.c:1417 [inline]
 __x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1417
 x64_sys_call+0x2bb4/0x3000 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000330 -> 0x0000000000000340

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5748 Comm: syz.0.752 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/24 13:19 upstream 6fab32bb6508 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/10/16 00:15 upstream 1f4a222b0e33 19568248 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/10/04 10:56 upstream cbf33b8e0b36 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/10/03 06:23 upstream e406d57be7bd 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/10/01 15:40 upstream 50c19e20ed2e a1859138 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/09/01 10:10 upstream b320789d6883 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/08/09 12:20 upstream 2988dfed8a5d 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/07/13 22:41 upstream 5d5d62298b8b 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2025/06/22 15:22 upstream 739a6c93cc75 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
* Struck through repros no longer work on HEAD.