KCSAN: data-race in xas_find_marked / xas_init_marks (2)

11 views
Skip to first unread message

syzbot

unread,
Jun 1, 2021, 5:35:18 AM6/1/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c2131f7e Merge tag 'gfs2-v5.13-rc2-fixes' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11dbdb87d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e844fa8c959d01b
dashboard link: https://syzkaller.appspot.com/bug?extid=a46b57de934a5996888a
compiler: Debian clang version 11.0.1-2
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+a46b57...@syzkaller.appspotmail.com

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

write to 0xffff888106e8dfa8 of 8 bytes by task 9808 on cpu 0:
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+0x213/0xca0 lib/xarray.c:806
page_cache_delete_batch mm/filemap.c:328 [inline]
delete_from_page_cache_batch+0x375/0x690 mm/filemap.c:349
truncate_inode_pages_range+0x1a5/0xa80 mm/truncate.c:329
truncate_inode_pages mm/truncate.c:427 [inline]
truncate_pagecache+0x4f/0x70 mm/truncate.c:741
ext4_setattr+0xa21/0xec0 fs/ext4/inode.c:5498
notify_change+0x8a3/0xa80 fs/attr.c:398
do_truncate+0xe8/0x130 fs/open.c:64
handle_truncate fs/namei.c:3017 [inline]
do_open fs/namei.c:3365 [inline]
path_openat+0x1a79/0x20b0 fs/namei.c:3494
do_filp_open+0xd9/0x1f0 fs/namei.c:3521
do_sys_openat2+0xa3/0x250 fs/open.c:1187
do_sys_open fs/open.c:1203 [inline]
__do_sys_creat fs/open.c:1277 [inline]
__se_sys_creat fs/open.c:1271 [inline]
__x64_sys_creat+0x62/0x80 fs/open.c:1271
do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888106e8dfa8 of 8 bytes by task 2559 on cpu 1:
xas_find_chunk include/linux/xarray.h:1662 [inline]
xas_find_marked+0x195/0x5f0 lib/xarray.c:1349
find_get_entry mm/filemap.c:1925 [inline]
find_get_pages_range_tag+0xf2/0x390 mm/filemap.c:2216
pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1123
mpage_prepare_extent_to_map+0x195/0x640 fs/ext4/inode.c:2577
ext4_writepages+0x6c6/0x1d10 fs/ext4/inode.c:2754
do_writepages+0x7b/0x150 mm/page-writeback.c:2352
__writeback_single_inode+0x80/0x450 fs/fs-writeback.c:1467
writeback_sb_inodes+0x564/0xf10 fs/fs-writeback.c:1732
__writeback_inodes_wb fs/fs-writeback.c:1801 [inline]
wb_writeback+0x327/0x700 fs/fs-writeback.c:1907
wb_check_start_all fs/fs-writeback.c:2031 [inline]
wb_do_writeback+0x330/0x510 fs/fs-writeback.c:2057
wb_workfn+0xc8/0x520 fs/fs-writeback.c:2091
process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
worker_thread+0x636/0xae0 kernel/workqueue.c:2422
kthread+0x1d0/0x1f0 kernel/kthread.c:313
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

value changed: 0xffe0000000000000 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2559 Comm: kworker/u4:7 Not tainted 5.13.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)
==================================================================
sd 0:0:1:0: [sda] Synchronizing SCSI cache


---
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.
Reply all
Reply to author
Forward
0 new messages