syzbot


KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (2)

Status: auto-closed as invalid on 2020/04/08 03:07
Subsystems: fs
[Documentation on labels]
First crash: 1558d, last: 1542d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (4) fs mm 1 969d 969d 0/26 auto-closed as invalid on 2021/09/28 20:33
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev fs 1 1638d 1638d 0/26 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (3) fs mm 1 1004d 1004d 0/26 auto-closed as invalid on 2021/08/24 16:08
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (5) fs mm 2 903d 921d 0/26 auto-closed as invalid on 2021/12/03 09:28

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev

read to 0xffff88812ab4cce8 of 8 bytes by task 10925 on cpu 1:
 invalidate_bdev+0x3c/0x90 fs/block_dev.c:95
 __invalidate_device+0x61/0x80 fs/block_dev.c:2233
 invalidate_partition+0x4c/0x70 block/genhd.c:1614
 blk_drop_partitions+0xf6/0x1a0 block/partition-generic.c:455
 bdev_disk_changed+0xdd/0x1a0 fs/block_dev.c:1519
 loop_reread_partitions+0x36/0x70 drivers/block/loop.c:644
 loop_set_status+0xa02/0xb30 drivers/block/loop.c:1356
 loop_set_status64+0x6d/0xb0 drivers/block/loop.c:1476
 lo_ioctl+0x30b/0xc80 drivers/block/loop.c:1619
 __blkdev_driver_ioctl block/ioctl.c:277 [inline]
 blkdev_ioctl+0xbe5/0x1260 block/ioctl.c:582
 block_ioctl+0x95/0xc0 fs/block_dev.c:1983
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:545 [inline]
 do_vfs_ioctl+0x84f/0xcf0 fs/ioctl.c:732
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:749
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl fs/ioctl.c:754 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:754
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88812ab4cce8 of 8 bytes by task 10931 on cpu 0:
 __add_to_page_cache_locked+0x298/0x780 mm/filemap.c:890
 add_to_page_cache_lru+0xc4/0x260 mm/filemap.c:943
 mpage_readpages+0x263/0x3c0 fs/mpage.c:399
 blkdev_readpages+0x36/0x50 fs/block_dev.c:620
 read_pages+0xa2/0x2d0 mm/readahead.c:126
 __do_page_cache_readahead+0x353/0x390 mm/readahead.c:212
 force_page_cache_readahead+0x13a/0x1f0 mm/readahead.c:243
 page_cache_sync_readahead+0x1cf/0x1e0 mm/readahead.c:522
 generic_file_buffered_read mm/filemap.c:2051 [inline]
 generic_file_read_iter+0xeb6/0x1440 mm/filemap.c:2324
 blkdev_read_iter+0xb2/0xe0 fs/block_dev.c:2039
 call_read_iter include/linux/fs.h:1896 [inline]
 new_sync_read+0x389/0x4f0 fs/read_write.c:414
 __vfs_read+0xb1/0xc0 fs/read_write.c:427
 vfs_read fs/read_write.c:461 [inline]
 vfs_read+0x143/0x2c0 fs/read_write.c:446
 ksys_read+0xd5/0x1b0 fs/read_write.c:587
 __do_sys_read fs/read_write.c:597 [inline]
 __se_sys_read fs/read_write.c:595 [inline]
 __x64_sys_read+0x4c/0x60 fs/read_write.c:595
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10931 Comm: blkid Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/29 03:01 https://github.com/google/ktsan.git kcsan 245a43005292 c8e81ce4 .config console log report ci2-upstream-kcsan-gce
2020/01/13 12:16 https://github.com/google/ktsan.git kcsan 245a43005292 99565c1a .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.