KCSAN: data-race in find_get_pages_range_tag / xas_init_marks

4 views
Skip to first unread message

syzbot

unread,
Dec 7, 2020, 6:26:16 AM12/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 27bba9c5 Merge tag 'scsi-fixes' of git://git.kernel.org/pu..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15c74646500000
kernel config: https://syzkaller.appspot.com/x/.config?x=73fc125ff8990ab9
dashboard link: https://syzkaller.appspot.com/bug?extid=f09a20952c7010d93bea
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project.git 913f6005669cfb590c99865a90bc51ed0983d09d)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

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

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

write to 0xffff8881375a86b8 of 8 bytes by task 896 on cpu 1:
instrument_write include/linux/instrumented.h:42 [inline]
__instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:79 [inline]
__test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:109 [inline]
node_clear_mark lib/xarray.c:100 [inline]
xas_clear_mark lib/xarray.c:911 [inline]
xas_init_marks+0x1b0/0x340 lib/xarray.c:944
xas_store+0x1f7/0xcb0 lib/xarray.c:806
page_cache_delete_batch mm/filemap.c:337 [inline]
delete_from_page_cache_batch+0x3e4/0x800 mm/filemap.c:358
truncate_inode_pages_range+0x482/0xf20 mm/truncate.c:366
truncate_inode_pages mm/truncate.c:476 [inline]
truncate_pagecache+0x4f/0x70 mm/truncate.c:839
ext4_setattr+0xaf9/0xf70 fs/ext4/inode.c:5487
notify_change+0x7b3/0xa50 fs/attr.c:336
do_truncate+0xe0/0x120 fs/open.c:64
handle_truncate fs/namei.c:2910 [inline]
do_open fs/namei.c:3256 [inline]
path_openat+0x1a37/0x20a0 fs/namei.c:3369
do_filp_open+0xbd/0x1d0 fs/namei.c:3396
do_sys_openat2+0xa3/0x240 fs/open.c:1168
do_sys_open fs/open.c:1184 [inline]
__do_sys_creat fs/open.c:1258 [inline]
__se_sys_creat fs/open.c:1252 [inline]
__x64_sys_creat+0x62/0x80 fs/open.c:1252
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8881375a86b8 of 8 bytes by task 21474 on cpu 0:
xas_find_chunk include/linux/xarray.h:1660 [inline]
xas_next_marked include/linux/xarray.h:1691 [inline]
find_get_pages_range_tag+0x35c/0x600 mm/filemap.c:2094
pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1161
mpage_prepare_extent_to_map+0x18a/0x630 fs/ext4/inode.c:2569
ext4_writepages+0x674/0x1e30 fs/ext4/inode.c:2746
do_writepages+0x7b/0x150 mm/page-writeback.c:2352
__writeback_single_inode+0x84/0x560 fs/fs-writeback.c:1461
writeback_sb_inodes+0x6a0/0x1020 fs/fs-writeback.c:1721
wb_writeback+0x27d/0x660 fs/fs-writeback.c:1894
wb_do_writeback+0x101/0x5d0 fs/fs-writeback.c:2039
wb_workfn+0xb8/0x410 fs/fs-writeback.c:2080
process_one_work+0x3e1/0x950 kernel/workqueue.c:2272
worker_thread+0x635/0xb90 kernel/workqueue.c:2418
kthread+0x1fa/0x220 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

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


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 28, 2021, 5:39:18 PM3/28/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