syzbot


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

Status: auto-closed as invalid on 2021/08/24 16:08
Subsystems: fs mm
[Documentation on labels]
First crash: 1288d, last: 1288d
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 1253d 1253d 0/28 auto-closed as invalid on 2021/09/28 20:33
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev fs 1 1922d 1922d 0/28 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (2) fs 2 1826d 1842d 0/28 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 1187d 1205d 0/28 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

write to 0xffff888100405588 of 8 bytes by task 20453 on cpu 0:
 __add_to_page_cache_locked+0x256/0x4b0 mm/filemap.c:914
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:967
 page_cache_ra_unbounded+0x262/0x410 mm/readahead.c:221
 do_page_cache_ra mm/readahead.c:267 [inline]
 force_page_cache_ra+0x246/0x280 mm/readahead.c:299
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:573
 page_cache_sync_readahead include/linux/pagemap.h:884 [inline]
 filemap_get_pages mm/filemap.c:2467 [inline]
 filemap_read+0x388/0x1220 mm/filemap.c:2550
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1669
 call_read_iter include/linux/fs.h:2108 [inline]
 generic_file_splice_read+0x22a/0x310 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888100405588 of 8 bytes by task 1042 on cpu 1:
 invalidate_bdev+0x2e/0x70 fs/block_dev.c:94
 bdev_disk_changed+0xf3/0xea0 block/partitions/core.c:677
 blkdev_get_whole+0x2f2/0x350 fs/block_dev.c:1267
 blkdev_get_by_dev+0x2ad/0x8d0 fs/block_dev.c:1415
 blkdev_reread_part block/ioctl.c:102 [inline]
 blkdev_common_ioctl+0xfc8/0x1040 block/ioctl.c:510
 blkdev_ioctl+0x16e/0x3c0 block/ioctl.c:579
 block_ioctl+0x6d/0x80 fs/block_dev.c:1602
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000000000a5 -> 0x00000000000000a6

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1042 Comm: systemd-udevd Not tainted 5.14.0-rc2-syzkaller #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
2021/07/20 15:59 upstream 8cae8cd89f05 1b201b48 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev
* Struck through repros no longer work on HEAD.