KCSAN: data-race in __xa_clear_mark / find_get_pages_range_tag

4 views
Skip to first unread message

syzbot

unread,
Jul 1, 2020, 7:02:15 AM7/1/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7c30b859 Merge tag 'spi-fix-v5.8-rc3' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=160c8aa7100000
kernel config: https://syzkaller.appspot.com/x/.config?x=ef2c2e4f6006998c
dashboard link: https://syzkaller.appspot.com/bug?extid=ef472c87cd23676ef6fe
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project.git ca2dcbd030eadbf0aa9b660efe864ff08af6e18b)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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+ef472c...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __xa_clear_mark / find_get_pages_range_tag

write to 0xffff8880bacfcfb0 of 8 bytes by task 21 on cpu 0:
instrument_write include/linux/instrumented.h:42 [inline]
__test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:85 [inline]
node_clear_mark lib/xarray.c:100 [inline]
xas_clear_mark lib/xarray.c:908 [inline]
__xa_clear_mark+0x229/0x350 lib/xarray.c:1726
test_clear_page_writeback+0x28d/0x480 mm/page-writeback.c:2741
end_page_writeback+0xa7/0x110 mm/filemap.c:1314
ext4_finish_bio+0x429/0x490 fs/ext4/page-io.c:146
ext4_release_io_end+0x98/0x200 fs/ext4/page-io.c:161
ext4_end_io_end fs/ext4/page-io.c:195 [inline]
ext4_do_flush_completed_IO fs/ext4/page-io.c:260 [inline]
ext4_end_io_rsv_work+0x306/0x360 fs/ext4/page-io.c:274
process_one_work+0x3e1/0x9a0 kernel/workqueue.c:2269
worker_thread+0x665/0xbe0 kernel/workqueue.c:2415
kthread+0x20d/0x230 kernel/kthread.c:291
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293

read to 0xffff8880bacfcfb0 of 8 bytes by task 10381 on cpu 1:
xas_find_chunk include/linux/xarray.h:1625 [inline]
xas_next_marked include/linux/xarray.h:1656 [inline]
find_get_pages_range_tag+0x30c/0x580 mm/filemap.c:1908
pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1120
__filemap_fdatawait_range+0xab/0x1b0 mm/filemap.c:518
file_write_and_wait_range+0xea/0x120 mm/filemap.c:764
ext4_sync_file+0xfc/0x6e0 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2882 [inline]
ext4_buffered_write_iter+0x369/0x3b0 fs/ext4/file.c:277
ext4_file_write_iter+0x76f/0x1010 include/linux/fs.h:804
call_write_iter include/linux/fs.h:1907 [inline]
new_sync_write fs/read_write.c:484 [inline]
__vfs_write+0x2d8/0x340 fs/read_write.c:497
vfs_write+0x19b/0x350 fs/read_write.c:559
ksys_write+0xce/0x180 fs/read_write.c:612
__do_sys_write fs/read_write.c:624 [inline]
__se_sys_write fs/read_write.c:621 [inline]
__x64_sys_write+0x3e/0x50 fs/read_write.c:621
do_syscall_64+0x51/0xb0 arch/x86/entry/common.c:359
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 10381 Comm: syz-executor.5 Not tainted 5.8.0-rc3-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,
Mar 24, 2021, 9:08:13 PM3/24/21
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