syzbot


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

Status: moderation: reported on 2026/06/11 15:38
Subsystems: mm fs
Labels: race:benign
[Documentation on labels]
Reported-by: syzbot+44b22b980a89a40cad9a@syzkaller.appspotmail.com
First crash: 1d01h, last: 1d01h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
67ffbfb6-f33c-4336-9dbd-6e0dd51bcaff assessment-kcsan Benign: ✅ KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (12) 2026/06/11 15:38 2026/06/11 15:38 2026/06/11 16:04 d93a6ab6ed29ab62226c0e5e77958854e7937415
Similar bugs (11)
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 1999d 2013d 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 710d 918d 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 420d 536d 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 (10) fs mm 6 12 149d 355d 0/29 auto-obsoleted due to no activity on 2026/03/11 12:48
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (11) fs mm 6 1 87d 87d 0/29 auto-obsoleted due to no activity on 2026/05/12 03:00
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (5) fs mm 6 3 1777d 1810d 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 1855d 1954d 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 1661d 1737d 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 632d 673d 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 2077d 2116d 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 2219d 2378d 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 0xffff888101cdd148 of 8 bytes by interrupt on cpu 1:
 percpu_counter_add_batch+0x105/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:577
 __folio_end_writeback+0x14b/0x360 mm/page-writeback.c:2970
 folio_end_writeback_no_dropbehind+0x6d/0x1d0 mm/filemap.c:1667
 folio_end_writeback+0x1c/0x70 mm/filemap.c:1693
 end_buffer_async_write+0x156/0x1f0 fs/buffer.c:415
 end_bio_bh_io_sync+0x79/0xa0 fs/buffer.c:2673
 bio_endio+0x35b/0x3f0 block/bio.c:1798
 blk_update_request+0x338/0x710 block/blk-mq.c:1016
 blk_mq_end_request+0x26/0x50 block/blk-mq.c:1178
 lo_complete_rq+0x98/0x140 drivers/block/loop.c:314
 blk_complete_reqs block/blk-mq.c:1253 [inline]
 blk_done_softirq+0x77/0xb0 block/blk-mq.c:1258
 handle_softirqs+0xb9/0x280 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x42/0xd0 kernel/softirq.c:735
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
 sysvec_apic_timer_interrupt+0x74/0x80 arch/x86/kernel/apic/apic.c:1061
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
 __preempt_count_dec_and_test arch/x86/include/asm/preempt.h:95 [inline]
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline]
 _raw_spin_unlock_irqrestore+0x1a/0x30 kernel/locking/spinlock.c:198
 spin_unlock_irqrestore include/linux/spinlock.h:408 [inline]
 lruvec_unlock_irqrestore include/linux/memcontrol.h:1492 [inline]
 folio_batch_move_lru+0x246/0x290 mm/swap.c:178
 __folio_batch_add_and_move mm/swap.c:196 [inline]
 folio_add_lru+0x14f/0x1f0 mm/swap.c:517
 shmem_alloc_and_add_folio mm/shmem.c:2034 [inline]
 shmem_get_folio_gfp+0x7b0/0xd60 mm/shmem.c:2564
 shmem_get_folio mm/shmem.c:2670 [inline]
 shmem_write_begin+0xfc/0x1f0 mm/shmem.c:3303
 generic_perform_write+0x183/0x490 mm/filemap.c:4325
 shmem_file_write_iter+0xc5/0xf0 mm/shmem.c:3478
 lo_rw_aio+0x67d/0x730 drivers/block/loop.c:-1
 do_req_filebacked drivers/block/loop.c:-1 [inline]
 loop_handle_cmd drivers/block/loop.c:1925 [inline]
 loop_process_work+0x56c/0xac0 drivers/block/loop.c:1960
 loop_workfn+0x31/0x40 drivers/block/loop.c:1984
 process_one_work kernel/workqueue.c:3314 [inline]
 process_scheduled_works+0x4f0/0x9c0 kernel/workqueue.c:3397
 worker_thread+0x58a/0x780 kernel/workqueue.c:3478
 kthread+0x22a/0x280 kernel/kthread.c:436
 ret_from_fork+0x146/0x330 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff888101cdd148 of 8 bytes by task 15115 on cpu 0:
 percpu_counter_read include/linux/percpu_counter.h:110 [inline]
 __wb_update_bandwidth+0x98/0x5d0 mm/page-writeback.c:1501
 wb_update_bandwidth mm/page-writeback.c:1528 [inline]
 do_writepages+0x2dd/0x310 mm/page-writeback.c:2594
 filemap_writeback mm/filemap.c:388 [inline]
 filemap_fdatawrite_range mm/filemap.c:413 [inline]
 filemap_write_and_wait_range+0x166/0x370 mm/filemap.c:685
 filemap_write_and_wait include/linux/pagemap.h:65 [inline]
 sync_blockdev block/bdev.c:276 [inline]
 bdev_release+0xeb/0x3d0 block/bdev.c:1134
 blkdev_release+0x15/0x20 block/fops.c:705
 __fput+0x29b/0x630 fs/file_table.c:510
 ____fput+0x1c/0x30 fs/file_table.c:538
 task_work_run+0x130/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
 exit_to_user_mode_loop+0x211/0x820 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
 do_syscall_64+0x232/0x3b0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000000035b0 -> 0x00000000000035c0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 15115 Comm: syz.5.4680 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/11 15:38 upstream 9716c086c8e8 d93a6ab6 .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.