syzbot


KCSAN: data-race in find_get_pages_range_tag / xas_clear_mark

Status: closed as invalid on 2019/10/18 14:11
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1036d, last: 1029d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in find_get_pages_range_tag / xas_clear_mark (2) 1017 531d 959d 0/23 auto-closed as invalid on 2021/03/31 05:51

Sample crash report:
==================================================================
BUG: KCSAN: data-race in find_get_pages_range_tag / xas_clear_mark

read to 0xffff8881259bafb0 of 8 bytes by task 8445 on cpu 0:
 xas_find_chunk include/linux/xarray.h:1590 [inline]
 xas_next_marked include/linux/xarray.h:1620 [inline]
 find_get_pages_range_tag+0x3d6/0x6d0 mm/filemap.c:1939
 pagevec_lookup_range_tag+0x45/0x70 mm/swap.c:1014
 __filemap_fdatawait_range+0xdc/0x1d0 mm/filemap.c:512
 filemap_fdatawait_range mm/filemap.c:547 [inline]
 filemap_fdatawait include/linux/fs.h:2709 [inline]
 filemap_write_and_wait mm/filemap.c:639 [inline]
 filemap_write_and_wait+0x7e/0xd0 mm/filemap.c:626
 ext4_ioctl_setflags+0x635/0x6e0 fs/ext4/ioctl.c:368
 ext4_ioctl+0x1fd2/0x29b0 fs/ext4/ioctl.c:795
 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+0xcf/0x2f0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8881259bafb0 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+0x146/0x1d0 lib/xarray.c:907
 __xa_clear_mark+0xd3/0x100 lib/xarray.c:1713
 test_clear_page_writeback+0x435/0x780 mm/page-writeback.c:2727
 end_page_writeback+0x9e/0x190 mm/filemap.c:1330
 ext4_finish_bio+0x40d/0x520 fs/ext4/page-io.c:110
 ext4_end_bio+0xd2/0x310 fs/ext4/page-io.c:334
 bio_endio+0x3ab/0x500 block/bio.c:1830
 req_bio_endio block/blk-core.c:239 [inline]
 blk_update_request+0x21d/0x6a0 block/blk-core.c:1424
 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:1465
 blk_done_softirq+0x1eb/0x250 block/blk-softirq.c:37
 __do_softirq+0x115/0x33f kernel/softirq.c:292

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7251 Comm: syz-executor.0 Not tainted 5.3.0+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2019/10/15 09:45 https://github.com/google/ktsan.git kcsan 81f95ec7998e 05ad7292 .config log report
ci2-upstream-kcsan-gce 2019/10/14 10:01 https://github.com/google/ktsan.git kcsan d724f94f63de a6aef847 .config log report
ci2-upstream-kcsan-gce 2019/10/10 09:38 https://github.com/google/ktsan.git kcsan d724f94f63de d52eff28 .config log report
ci2-upstream-kcsan-gce 2019/10/09 19:53 https://github.com/google/ktsan.git kcsan d724f94f63de c4b9981b .config log report
ci2-upstream-kcsan-gce 2019/10/08 10:53 https://github.com/google/ktsan.git kcsan c1c7521f03c7 64612bfd .config log report