syzbot


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

Status: auto-closed as invalid on 2021/12/03 09:28
Subsystems: fs mm
[Documentation on labels]
First crash: 926d, last: 908d
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 974d 974d 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 1643d 1643d 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 1009d 1009d 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 1547d 1563d 0/26 auto-closed as invalid on 2020/04/08 03:07

Sample crash report:
loop1: detected capacity change from 0 to 264192
==================================================================
BUG: KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev

write to 0xffff888100433be8 of 8 bytes by task 4660 on cpu 0:
 __add_to_page_cache_locked+0x276/0x4f0 mm/filemap.c:931
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:984
 page_cache_ra_unbounded+0x274/0x430 mm/readahead.c:222
 do_page_cache_ra mm/readahead.c:269 [inline]
 force_page_cache_ra+0x256/0x290 mm/readahead.c:301
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:575
 page_cache_sync_readahead include/linux/pagemap.h:883 [inline]
 filemap_get_pages mm/filemap.c:2545 [inline]
 filemap_read+0x3ad/0x1220 mm/filemap.c:2628
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 blkdev_read_iter+0xb9/0xf0 block/fops.c:545
 call_read_iter include/linux/fs.h:2157 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:485
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888100433be8 of 8 bytes by task 23125 on cpu 1:
 invalidate_bdev+0x31/0x80 block/bdev.c:85
 bdev_disk_changed+0xf6/0xe60 block/partitions/core.c:677
 loop_reread_partitions drivers/block/loop.c:693 [inline]
 loop_set_status+0x4e2/0x5a0 drivers/block/loop.c:1574
 lo_ioctl+0x82c/0x13e0
 blkdev_ioctl+0x1d0/0x3f0 block/ioctl.c:589
 block_ioctl+0x6e/0x80 block/fops.c:478
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:860
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000003 -> 0x0000000000000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23125 Comm: syz-executor.1 Not tainted 5.15.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
 loop1: p2 < > p4
loop1: p4 size 2097152 extends beyond EOD, truncated

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/29 09:19 upstream f25a5481af12 2353a3ec .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / invalidate_bdev
2021/10/11 17:23 upstream 64570fbc14f8 838e7e2c .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.