syzbot


KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev

Status: closed as invalid on 2019/11/19 13:44
Subsystems: fs
[Documentation on labels]
First crash: 1638d, last: 1638d
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 968d 968d 0/26 auto-closed as invalid on 2021/09/28 20:33
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 (2) fs 2 1542d 1558d 0/26 auto-closed as invalid on 2020/04/08 03:07
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 0xffff88812b403620 of 8 bytes by task 8030 on cpu 0:
 invalidate_bdev+0x3c/0x90 fs/block_dev.c:95
 __invalidate_device+0x61/0x80 fs/block_dev.c:2204
 invalidate_partition+0x4c/0x70 block/genhd.c:1610
 drop_partitions block/partition-generic.c:450 [inline]
 rescan_partitions+0xad/0x680 block/partition-generic.c:523
 __blkdev_reread_part+0xdd/0x110 block/ioctl.c:174
 blkdev_reread_part+0x2e/0x50 block/ioctl.c:194
 loop_reread_partitions+0x25/0x50 drivers/block/loop.c:633
 loop_set_status+0xa02/0xb30 drivers/block/loop.c:1343
 loop_set_status64+0x6d/0xb0 drivers/block/loop.c:1463
 lo_ioctl+0x30b/0xc80 drivers/block/loop.c:1606
 __blkdev_driver_ioctl block/ioctl.c:304 [inline]
 blkdev_ioctl+0x979/0x1160 block/ioctl.c:606
 block_ioctl+0x95/0xc0 fs/block_dev.c:1954
 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

write to 0xffff88812b403620 of 8 bytes by task 8048 on cpu 1:
 __add_to_page_cache_locked+0x298/0x780 mm/filemap.c:889
 add_to_page_cache_lru+0xe2/0x2d0 mm/filemap.c:942
 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:2050 [inline]
 generic_file_read_iter+0xeb6/0x1440 mm/filemap.c:2323
 blkdev_read_iter+0xb2/0xe0 fs/block_dev.c:2010
 call_read_iter include/linux/fs.h:1889 [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

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8048 Comm: blkid Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/25 12:31 https://github.com/google/ktsan.git kcsan 05f2236801fe 04ca72cd .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.