================================================================== BUG: KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch read-write to 0xffff888101074940 of 8 bytes by task 6855 on cpu 0: percpu_counter_add_batch+0xc9/0x140 lib/percpu_counter.c:96 wb_stat_mod include/linux/backing-dev.h:67 [inline] __wb_writeout_add+0x4c/0x1d0 mm/page-writeback.c:583 __folio_end_writeback+0x21b/0x4a0 mm/page-writeback.c:2963 folio_end_writeback+0x74/0x1f0 mm/filemap.c:1599 ext4_finish_bio+0x47b/0x8e0 fs/ext4/page-io.c:145 ext4_release_io_end+0x8c/0x1e0 fs/ext4/page-io.c:160 ext4_end_io_end fs/ext4/page-io.c:194 [inline] ext4_do_flush_completed_IO fs/ext4/page-io.c:259 [inline] ext4_end_io_rsv_work+0x2d3/0x360 fs/ext4/page-io.c:273 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706 worker_thread+0x525/0x730 kernel/workqueue.c:2787 kthread+0x1d7/0x210 kernel/kthread.c:388 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 read to 0xffff888101074940 of 8 bytes by task 22111 on cpu 1: percpu_counter_read include/linux/percpu_counter.h:110 [inline] __wb_update_bandwidth+0x9b/0x5c0 mm/page-writeback.c:1462 wb_update_bandwidth mm/page-writeback.c:1489 [inline] do_writepages+0x30a/0x340 mm/page-writeback.c:2584 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] __filemap_fdatawrite mm/filemap.c:427 [inline] filemap_flush+0x95/0xc0 mm/filemap.c:454 ext4_alloc_da_blocks+0x50/0x130 fs/ext4/inode.c:3072 ext4_release_file+0x5f/0x1c0 fs/ext4/file.c:169 __fput+0x299/0x630 fs/file_table.c:376 ____fput+0x15/0x20 fs/file_table.c:404 task_work_run+0x135/0x1a0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x604/0x16d0 kernel/exit.c:871 do_group_exit+0x101/0x150 kernel/exit.c:1020 get_signal+0xf4e/0x10a0 kernel/signal.c:2893 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x58/0x130 kernel/entry/common.c:212 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x00000000000cb6f0 -> 0x00000000000cb700 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 22111 Comm: syz-executor.2 Not tainted 6.8.0-rc3-syzkaller-00005-g99bd3cb0d12e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 ==================================================================