KCSAN: data-race in balance_dirty_pages / percpu_counter_add_batch

9 views
Skip to first unread message

syzbot

unread,
Mar 8, 2020, 6:15:14 PM3/8/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 941e0d91 mm, kcsan: Instrument SLAB/SLUB free with ASSERT_..
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=13f9f9fde00000
kernel config: https://syzkaller.appspot.com/x/.config?x=b313b4492ea15bae
dashboard link: https://syzkaller.appspot.com/bug?extid=5d0e5bc27e68426b557f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org el...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5d0e5b...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in balance_dirty_pages / percpu_counter_add_batch

write to 0xffff88809bb42090 of 8 bytes by task 23913 on cpu 1:
percpu_counter_add_batch+0xbc/0x140 lib/percpu_counter.c:91
__add_wb_stat include/linux/backing-dev.h:74 [inline]
dec_wb_stat include/linux/backing-dev.h:84 [inline]
test_clear_page_writeback+0x4fe/0x7e0 mm/page-writeback.c:2736
end_page_writeback+0x98/0x180 mm/filemap.c:1317
ext4_finish_bio+0x430/0x540 fs/ext4/page-io.c:148
ext4_release_io_end+0xc5/0x270 fs/ext4/page-io.c:163
ext4_end_io_end fs/ext4/page-io.c:197 [inline]
ext4_do_flush_completed_IO fs/ext4/page-io.c:262 [inline]
ext4_end_io_rsv_work+0x159/0x400 fs/ext4/page-io.c:276
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

read to 0xffff88809bb42090 of 8 bytes by task 31448 on cpu 0:
wb_stat include/linux/backing-dev.h:89 [inline]
wb_dirty_limits mm/page-writeback.c:1550 [inline]
balance_dirty_pages+0x11e1/0x1ab0 mm/page-writeback.c:1693
balance_dirty_pages_ratelimited+0x6f9/0xa20 mm/page-writeback.c:1913
generic_perform_write+0x224/0x320 mm/filemap.c:3323
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

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 31448 Comm: syz-executor.4 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 18, 2020, 9:11:10 AM6/18/20
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages