syzbot


KCSAN: data-race in xas_clear_mark / xas_find_marked

Status: closed as invalid on 2019/10/18 14:11
Subsystems: mm
[Documentation on labels]
First crash: 1692d, last: 1686d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_clear_mark / xas_find_marked (2) fs mm 3582 1h12m 1631d 0/26 moderation: reported on 2019/12/10 21:55

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

read to 0xffff888125e0e8f0 of 8 bytes by task 7325 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
 file_write_and_wait_range+0x134/0x160 mm/filemap.c:785
 __generic_file_fsync+0x59/0x190 fs/libfs.c:1000
 ext4_sync_file+0x48e/0xb00 fs/ext4/fsync.c:120
 vfs_fsync_range+0x82/0x150 fs/sync.c:197
 generic_write_sync include/linux/fs.h:2853 [inline]
 ext4_file_write_iter+0x45b/0xa00 fs/ext4/file.c:279
 call_write_iter include/linux/fs.h:1895 [inline]
 new_sync_write+0x388/0x4a0 fs/read_write.c:483
 __vfs_write+0xb1/0xc0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0xd5/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620

write to 0xffff888125e0e8f0 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+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

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3006 Comm: kworker/1:2 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events linkwatch_event
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/17 18:32 https://github.com/google/ktsan.git kcsan 05f2236801fe 8c88c9c1 .config console log report ci2-upstream-kcsan-gce
2019/10/13 10:34 https://github.com/google/ktsan.git kcsan d724f94f63de 2f661ec4 .config console log report ci2-upstream-kcsan-gce
2019/10/11 16:17 https://github.com/google/ktsan.git kcsan d724f94f63de 426631dd .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.