syzbot


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

Status: auto-obsoleted due to no activity on 2024/10/23 14:01
Subsystems: mm fs
[Documentation on labels]
Reported-by: syzbot+ad9fdf192618c517ab9d@syzkaller.appspotmail.com
First crash: 135d, last: 93d
Similar bugs (7)
Kernel Title 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 2 1461d 1475d 0/28 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 295 172d 380d 0/28 auto-obsoleted due to no activity on 2024/08/05 19:12
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (5) fs mm 3 1238d 1272d 0/28 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 1317d 1416d 0/28 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 17 1123d 1199d 0/28 auto-closed as invalid on 2021/12/29 06:33
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (2) fs mm 3 1539d 1577d 0/28 auto-closed as invalid on 2020/11/08 10:33
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch mm fs 9 1681d 1839d 0/28 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 0xffff888100fb6948 of 8 bytes by interrupt on cpu 1:
 percpu_counter_add_batch+0x120/0x140 lib/percpu_counter.c:107
 wb_stat_mod include/linux/backing-dev.h:66 [inline]
 __wb_writeout_add+0x45/0x1d0 mm/page-writeback.c:607
 __folio_end_writeback+0x215/0x4a0 mm/page-writeback.c:3091
 folio_end_writeback+0x74/0x1f0 mm/filemap.c:1632
 end_buffer_async_write+0x1ca/0x230 fs/buffer.c:409
 end_bio_bh_io_sync+0x76/0xa0 fs/buffer.c:2771
 bio_endio+0x369/0x410 block/bio.c:1708
 blk_update_request+0x382/0x880 block/blk-mq.c:925
 blk_mq_end_request+0x26/0x50 block/blk-mq.c:1053
 lo_complete_rq+0xce/0x180 drivers/block/loop.c:386
 blk_complete_reqs block/blk-mq.c:1128 [inline]
 blk_done_softirq+0x74/0xb0 block/blk-mq.c:1133
 handle_softirqs+0xbf/0x280 kernel/softirq.c:554
 run_ksoftirqd+0x1c/0x30 kernel/softirq.c:927
 smpboot_thread_fn+0x31c/0x4c0 kernel/smpboot.c:164
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888100fb6948 of 8 bytes by task 19482 on cpu 0:
 percpu_counter_read include/linux/percpu_counter.h:110 [inline]
 __wb_update_bandwidth+0x9b/0x5d0 mm/page-writeback.c:1529
 wb_update_bandwidth mm/page-writeback.c:1556 [inline]
 do_writepages+0x443/0x480 mm/page-writeback.c:2709
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:397
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 __filemap_fdatawrite mm/filemap.c:436 [inline]
 filemap_flush+0x61/0x90 mm/filemap.c:463
 sync_blockdev_nowait+0x29/0x40 block/bdev.c:207
 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:1696
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7289
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1373
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1380
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 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:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 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: 0x00000000000041f0 -> 0x0000000000004200

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 19482 Comm: syz-executor Tainted: G        W          6.11.0-syzkaller-04744-gbdf56c7580d2 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================
EXT4-fs (loop4): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/18 14:00 upstream bdf56c7580d2 c673ca06 .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
2024/08/27 09:48 upstream 3e9bff3bbe13 9aee4e0b .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
2024/08/15 17:41 upstream 1fb918967b56 e4bacdaf .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
2024/08/08 05:34 upstream 6a0e38264012 de12cf65 .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.