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

11 views
Skip to first unread message

syzbot

unread,
Jun 26, 2021, 2:58:23 PM6/26/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b7050b24 Merge tag 'pinctrl-v5.13-3' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10b71d08300000
kernel config: https://syzkaller.appspot.com/x/.config?x=a702dbad4961cdfa
dashboard link: https://syzkaller.appspot.com/bug?extid=03743c59b799c7b55cd4
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+03743c...@syzkaller.appspotmail.com

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

write to 0xffff888106e5a6b0 of 8 bytes by task 1775 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]
__xa_clear_mark+0x1d9/0x2c0 lib/xarray.c:1917
test_clear_page_writeback+0x23e/0x560 mm/page-writeback.c:2736
end_page_writeback+0xd7/0x1b0 mm/filemap.c:1548
ext4_finish_bio+0x3e2/0x430 fs/ext4/page-io.c:143
ext4_release_io_end+0x98/0x200 fs/ext4/page-io.c:158
ext4_end_io_end fs/ext4/page-io.c:192 [inline]
ext4_do_flush_completed_IO fs/ext4/page-io.c:257 [inline]
ext4_end_io_rsv_work+0x306/0x360 fs/ext4/page-io.c:271
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

read to 0xffff888106e5a6b0 of 8 bytes by task 6249 on cpu 0:
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
__filemap_fdatawait_range+0xab/0x1b0 mm/filemap.c:510
filemap_fdatawait_range mm/filemap.c:545 [inline]
filemap_write_and_wait_range+0x264/0x390 mm/filemap.c:695
filemap_write_and_wait include/linux/fs.h:2892 [inline]
ext4_ioctl_setflags fs/ext4/ioctl.c:397 [inline]
ext4_fileattr_set+0x592/0xf00 fs/ext4/ioctl.c:763
vfs_fileattr_set+0x55e/0x5a0 fs/ioctl.c:895
do_vfs_ioctl+0x1077/0x1410 fs/ioctl.c:927
__do_sys_ioctl fs/ioctl.c:1067 [inline]
__se_sys_ioctl+0x83/0x140 fs/ioctl.c:1055
__x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffffff8000000000 -> 0xfffff00000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6249 Comm: syz-executor.2 Not tainted 5.13.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
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