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

12 views
Skip to first unread message

syzbot

unread,
Dec 10, 2019, 4:55:10 PM12/10/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 05f22368 x86, kcsan: Enable KCSAN for x86
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=10d7f560e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=87d111955f40591f
dashboard link: https://syzkaller.appspot.com/bug?extid=6b653cb0a28eee8c400a
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ak...@linux-foundation.org ax...@kernel.dk
bfo...@redhat.com dchi...@redhat.com ja...@suse.cz laoar...@gmail.com
linux-...@vger.kernel.org linu...@kvack.org rp...@linux.ibm.com
tg...@linutronix.de t...@kernel.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+6b653c...@syzkaller.appspotmail.com

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

write to 0xffff888125839b30 of 8 bytes by interrupt on cpu 1:
__test_and_clear_bit include/asm-generic/bitops-instrumented.h:213 [inline]
node_clear_mark lib/xarray.c:99 [inline]
xas_clear_mark+0x11a/0x1d0 lib/xarray.c:907
__xa_clear_mark+0xd3/0x100 lib/xarray.c:1713
test_clear_page_writeback+0x449/0x790 mm/page-writeback.c:2731
end_page_writeback+0x9e/0x190 mm/filemap.c:1338
ext4_finish_bio+0x40d/0x520 fs/ext4/page-io.c:110
ext4_end_bio+0xd2/0x310 fs/ext4/page-io.c:334
bio_endio+0x3a8/0x4f0 block/bio.c:1818
req_bio_endio block/blk-core.c:242 [inline]
blk_update_request+0x427/0x7b0 block/blk-core.c:1462
scsi_end_request+0x6b/0x3e0 drivers/scsi/scsi_lib.c:579
scsi_io_completion+0x11d/0xc80 drivers/scsi/scsi_lib.c:963
scsi_finish_command+0x280/0x380 drivers/scsi/scsi.c:228
scsi_softirq_done+0x259/0x280 drivers/scsi/scsi_lib.c:1477
blk_done_softirq+0x1eb/0x250 block/blk-softirq.c:37
__do_softirq+0x115/0x33f kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0xbb/0xe0 kernel/softirq.c:413

read to 0xffff888125839b30 of 8 bytes by task 7840 on cpu 0:
xas_find_chunk include/linux/xarray.h:1590 [inline]
xas_find_marked+0x17a/0x7b0 lib/xarray.c:1187
find_get_pages_range_tag+0x111/0x670 mm/filemap.c:1924
pagevec_lookup_range_tag+0x45/0x70 mm/swap.c:1054
__filemap_fdatawait_range+0xdc/0x1d0 mm/filemap.c:517
filemap_fdatawait_range mm/filemap.c:552 [inline]
filemap_fdatawait include/linux/fs.h:2736 [inline]
filemap_write_and_wait mm/filemap.c:647 [inline]
filemap_write_and_wait+0xdb/0x150 mm/filemap.c:634
ext4_ioctl_setflags+0x635/0x6e0 fs/ext4/ioctl.c:368
ext4_ioctl+0x28af/0x3130 fs/ext4/ioctl.c:863
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:509 [inline]
do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696
ksys_ioctl+0xbd/0xe0 fs/ioctl.c:713
__do_sys_ioctl fs/ioctl.c:720 [inline]
__se_sys_ioctl fs/ioctl.c:718 [inline]
__x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:718
do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7840 Comm: syz-executor.5 Not tainted 5.4.0-rc3+ #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.
Reply all
Reply to author
Forward
0 new messages