syzbot


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

Status: auto-closed as invalid on 2021/09/28 20:33
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 468d, last: 468d
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 1 1138d 1138d 0/24 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (3) 1 503d 503d 0/24 auto-closed as invalid on 2021/08/24 16:08
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (2) 2 1042d 1058d 0/24 auto-closed as invalid on 2020/04/08 03:07
upstream KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev (5) 2 403d 420d 0/24 auto-closed as invalid on 2021/12/03 09:28

Sample crash report:
loop5: p2 size 1073872896 extends beyond EOD, truncated
loop5: p3 size 1912633224 extends beyond EOD, truncated
loop5: p4 size 3657465856 extends beyond EOD, truncated
loop5: detected capacity change from 0 to 264192
==================================================================
BUG: KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev

write to 0xffff8881017b4c10 of 8 bytes by task 14852 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:1671
 call_read_iter include/linux/fs.h:2108 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 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 0xffff8881017b4c10 of 8 bytes by task 14888 on cpu 1:
 invalidate_bdev+0x2e/0x70 fs/block_dev.c:94
 bdev_disk_changed+0xf3/0xea0 block/partitions/core.c:677
 loop_reread_partitions drivers/block/loop.c:693 [inline]
 loop_set_status+0x4dc/0x5a0 drivers/block/loop.c:1576
 lo_ioctl+0x7af/0x1340 drivers/block/loop.c:1686
 blkdev_ioctl+0x1d0/0x3c0 block/ioctl.c:585
 block_ioctl+0x6d/0x80 fs/block_dev.c:1604
 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: 0x0000000000000000 -> 0x0000000000000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14888 Comm: syz-executor.5 Not tainted 5.14.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
 loop5: p1 p2 p3 p4
loop5: p1 size 11290111 extends beyond EOD, truncated
loop5: p2 size 1073872896 extends beyond EOD, truncated
loop5: p3 size 1912633224 extends beyond EOD, truncated
loop5: p4 size 3657465856 extends beyond EOD, truncated

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/08/24 20:31 upstream 6e764bcd1cf7 b599f2fc .config log report info KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev
* Struck through repros no longer work on HEAD.