syzbot


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

Status: auto-closed as invalid on 2021/09/04 14:56
Subsystems: fs mm
[Documentation on labels]
First crash: 1034d, last: 1000d
Similar bugs (6)
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 1223d 1236d 0/26 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 278 3d02h 141d 0/26 moderation: reported on 2023/12/07 10:04
upstream KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch (4) fs mm 6 1078d 1177d 0/26 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 884d 961d 0/26 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 1300d 1339d 0/26 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 1442d 1601d 0/26 closed as invalid on 2020/06/18 14:24

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

write to 0xffff888100fa7940 of 8 bytes by task 1914 on cpu 1:
 percpu_counter_add_batch+0x9c/0xd0 lib/percpu_counter.c:91
 __add_wb_stat include/linux/backing-dev.h:70 [inline]
 inc_wb_stat include/linux/backing-dev.h:75 [inline]
 __wb_writeout_inc mm/page-writeback.c:592 [inline]
 test_clear_page_writeback+0x34d/0x560 mm/page-writeback.c:2754
 end_page_writeback+0xd7/0x1b0 mm/filemap.c:1548
 ext4_finish_bio+0x3e2/0x430 fs/ext4/page-io.c:143
 ext4_release_io_end+0x98/0x200 fs/ext4/page-io.c:158
 ext4_end_io_end fs/ext4/page-io.c:192 [inline]
 ext4_do_flush_completed_IO fs/ext4/page-io.c:257 [inline]
 ext4_end_io_rsv_work+0x306/0x360 fs/ext4/page-io.c:271
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

read to 0xffff888100fa7940 of 8 bytes by task 1897 on cpu 0:
 percpu_counter_read include/linux/percpu_counter.h:72 [inline]
 __wb_update_bandwidth+0x9f/0x480 mm/page-writeback.c:1353
 wb_update_bandwidth+0x4e/0x70 mm/page-writeback.c:1387
 wb_writeback+0x421/0x700 fs/fs-writeback.c:2056
 wb_check_old_data_flush fs/fs-writeback.c:2155 [inline]
 wb_do_writeback+0x461/0x510 fs/fs-writeback.c:2208
 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2237
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

value changed: 0x0000000000000b90 -> 0x0000000000000ba0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1897 Comm: kworker/u4:6 Not tainted 5.14.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-8:0)
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/31 14:48 upstream c7d102232649 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2021/07/28 21:49 upstream 4010a528219e 9a4781d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
2021/06/27 21:40 upstream b4b27b9eed8e 9d2ab5df .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __wb_update_bandwidth / percpu_counter_add_batch
* Struck through repros no longer work on HEAD.