syzbot


KCSAN: data-race in percpu_counter_add_batch / wb_over_bg_thresh

Status: auto-closed as invalid on 2020/06/18 13:53
Subsystems: fs mm
[Documentation on labels]
First crash: 1912d, last: 1753d

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

write to 0xffff88809cc8a468 of 8 bytes by task 13989 on cpu 1:
 percpu_counter_add_batch+0xbc/0x140 lib/percpu_counter.c:91
 __add_wb_stat include/linux/backing-dev.h:74 [inline]
 inc_wb_stat include/linux/backing-dev.h:79 [inline]
 account_page_dirtied+0x1e8/0x490 mm/page-writeback.c:2427
 __set_page_dirty+0x86/0x270 fs/buffer.c:623
 mark_buffer_dirty+0x26e/0x2b0 fs/buffer.c:1152
 __block_commit_write.isra.0+0x11d/0x170 fs/buffer.c:2081
 block_write_end+0x6d/0x140 fs/buffer.c:2159
 generic_write_end+0x8c/0x1f0 fs/buffer.c:2173
 ext4_da_write_end+0x162/0x670 fs/ext4/inode.c:3092
 generic_perform_write+0x1d7/0x320 mm/filemap.c:3298
 ext4_buffered_write_iter+0x14e/0x280 fs/ext4/file.c:270
 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1901 [inline]
 new_sync_write+0x303/0x400 fs/read_write.c:483
 __vfs_write+0x9e/0xb0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x189/0x380 fs/read_write.c:542
 ksys_write+0xc5/0x1a0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x49/0x60 fs/read_write.c:620
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809cc8a468 of 8 bytes by task 2513 on cpu 0:
 wb_stat include/linux/backing-dev.h:89 [inline]
 wb_over_bg_thresh+0x3d7/0x440 mm/page-writeback.c:1963
 wb_check_background_flush fs/fs-writeback.c:1952 [inline]
 wb_do_writeback fs/fs-writeback.c:2050 [inline]
 wb_workfn+0x38d/0x970 fs/fs-writeback.c:2078
 process_one_work+0x424/0x930 kernel/workqueue.c:2264
 worker_thread+0x9a/0x7e0 kernel/workqueue.c:2410
 kthread+0x1cb/0x1f0 kernel/kthread.c:255
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

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

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/11 04:23 https://github.com/google/ktsan.git kcsan 40959e34d670 a8c6a3f8 .config console log report ci2-upstream-kcsan-gce
2020/04/01 23:55 https://github.com/google/ktsan.git kcsan 40959e34d670 a34e2c33 .config console log report ci2-upstream-kcsan-gce
2020/03/29 01:48 https://github.com/google/ktsan.git kcsan 40959e34d670 05736b29 .config console log report ci2-upstream-kcsan-gce
2020/03/19 21:43 https://github.com/google/ktsan.git kcsan 40959e34d670 2c31c529 .config console log report ci2-upstream-kcsan-gce
2020/03/01 09:03 https://github.com/google/ktsan.git kcsan 766d004d1b85 c88c7b75 .config console log report ci2-upstream-kcsan-gce
2020/02/01 09:33 https://github.com/google/ktsan.git kcsan 245a43005292 0eb59c27 .config console log report ci2-upstream-kcsan-gce
2020/01/24 18:01 https://github.com/google/ktsan.git kcsan 245a43005292 2e95ab33 .config console log report ci2-upstream-kcsan-gce
2019/12/29 09:44 https://github.com/google/ktsan.git kcsan 245a43005292 af6b8ef8 .config console log report ci2-upstream-kcsan-gce
2019/12/23 01:06 https://github.com/google/ktsan.git kcsan 245a43005292 8b967267 .config console log report ci2-upstream-kcsan-gce
2019/12/16 01:13 https://github.com/google/ktsan.git kcsan 245a43005292 eef6e580 .config console log report ci2-upstream-kcsan-gce
2019/12/09 09:06 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1508f453 .config console log report ci2-upstream-kcsan-gce
2019/12/05 16:00 https://github.com/google/ktsan.git kcsan ef798c30ba4e 9fd5a512 .config console log report ci2-upstream-kcsan-gce
2019/12/03 06:31 https://github.com/google/ktsan.git kcsan ef798c30ba4e ab342da3 .config console log report ci2-upstream-kcsan-gce
2019/12/02 12:09 https://github.com/google/ktsan.git kcsan ef798c30ba4e f879db37 .config console log report ci2-upstream-kcsan-gce
2019/11/23 07:17 https://github.com/google/ktsan.git kcsan 5863cc791e4c 598ca6c8 .config console log report ci2-upstream-kcsan-gce
2019/11/21 07:57 https://github.com/google/ktsan.git kcsan 5863cc791e4c 8098ea0f .config console log report ci2-upstream-kcsan-gce
2019/11/20 20:02 https://github.com/google/ktsan.git kcsan 5863cc791e4c 432c7650 .config console log report ci2-upstream-kcsan-gce
2019/11/12 22:07 https://github.com/google/ktsan.git kcsan 7f2955e0d056 048f2d49 .config console log report ci2-upstream-kcsan-gce
2019/11/10 08:46 https://github.com/google/ktsan.git kcsan 94c006602e13 dc438b91 .config console log report ci2-upstream-kcsan-gce
2019/11/04 20:17 https://github.com/google/ktsan.git kcsan 94c006602e13 18e12644 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.