syzbot


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

Status: moderation: reported on 2025/06/22 15:22
Subsystems: mm fs
[Documentation on labels]
Reported-by: syzbot+ade9a83b6ae7a3c3c3fe@syzkaller.appspotmail.com
First crash: 221d, last: 15d
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) mm fs 6 2 1865d 1879d 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 576d 784d 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 286d 402d 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 1643d 1676d 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 1721d 1820d 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 1527d 1603d 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 498d 539d 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 1943d 1982d 0/29 auto-closed as invalid on 2020/11/08 10:33
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch fs mm 6 9 2085d 2244d 0/29 closed as invalid on 2020/06/18 14:24

Sample crash report:
EXT4-fs (loop4): can't get journal size
EXT4-fs (loop4): 1 truncate cleaned up
==================================================================
BUG: KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch

read-write to 0xffff88810198b948 of 8 bytes by interrupt on cpu 1:
 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/0x360 mm/page-writeback.c:2997
 folio_end_writeback_no_dropbehind+0x6d/0x1b0 mm/filemap.c:1661
 folio_end_writeback+0x1c/0x70 mm/filemap.c:1687
 ext4_finish_bio+0x459/0x8c0 fs/ext4/page-io.c:144
 ext4_end_bio+0x27b/0x380 fs/ext4/page-io.c:392
 bio_endio+0x37e/0x420 block/bio.c:1675
 blk_update_request+0x336/0x730 block/blk-mq.c:1007
 blk_mq_end_request+0x26/0x50 block/blk-mq.c:1169
 lo_complete_rq+0x98/0x140 drivers/block/loop.c:314
 blk_complete_reqs block/blk-mq.c:1244 [inline]
 blk_done_softirq+0x77/0xb0 block/blk-mq.c:1249
 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+0x149/0x290 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

read to 0xffff88810198b948 of 8 bytes by task 5004 on cpu 0:
 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:2621
 filemap_writeback mm/filemap.c:387 [inline]
 filemap_fdatawrite_range mm/filemap.c:412 [inline]
 file_write_and_wait_range+0x156/0x2c0 mm/filemap.c:786
 generic_buffers_fsync_noflush+0x45/0x130 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:188
 generic_write_sync include/linux/fs.h:2616 [inline]
 ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305
 ext4_file_write_iter+0x387/0xf60 fs/ext4/file.c:-1
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x52a/0x960 fs/read_write.c:686
 ksys_write+0xda/0x1a0 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:746
 x64_sys_call+0x2847/0x3000 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000150 -> 0x0000000000000160

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5004 Comm: syz.4.476 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/14 12:47 upstream c537e12daeec d6526ea3 .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
2026/01/07 16:01 upstream f0b9d8eb98df d6526ea3 .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/12/16 19:44 upstream 40fbbd64bba6 d6526ea3 .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/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.