syzbot


KCSAN: data-race in delete_from_page_cache_batch / page_mapping (3)

Status: auto-closed as invalid on 2020/12/21 11:15
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+1836817ad26433eced7e@syzkaller.appspotmail.com
First crash: 1263d, last: 1263d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in delete_from_page_cache_batch / page_mapping ext4 28 1459d 1632d 0/26 auto-closed as invalid on 2020/06/18 13:43
upstream KCSAN: data-race in delete_from_page_cache_batch / page_mapping (5) block 192 899d 1032d 0/26 auto-closed as invalid on 2021/12/06 07:47
upstream KCSAN: data-race in delete_from_page_cache_batch / page_mapping (4) isofs 3 1200d 1212d 0/26 auto-closed as invalid on 2021/02/08 17:09
upstream KCSAN: data-race in delete_from_page_cache_batch / page_mapping (2) fs 2 1314d 1346d 0/26 auto-closed as invalid on 2020/10/17 07:02

Sample crash report:
==================================================================
BUG: KCSAN: data-race in delete_from_page_cache_batch / page_mapping

write to 0xffffea000136c158 of 8 bytes by task 17855 on cpu 1:
 page_cache_delete_batch mm/filemap.c:327 [inline]
 delete_from_page_cache_batch+0x36b/0x800 mm/filemap.c:358
 truncate_inode_pages_range+0x482/0xf20 mm/truncate.c:366
 truncate_pagecache_range+0x80/0x90 mm/truncate.c:953
 ext4_punch_hole+0x36a/0x9c0 fs/ext4/inode.c:4066
 ext4_fallocate+0x11b/0x580 fs/ext4/extents.c:4660
 vfs_fallocate+0x43d/0x5d0 fs/open.c:309
 ksys_fallocate fs/open.c:332 [inline]
 __do_sys_fallocate fs/open.c:340 [inline]
 __se_sys_fallocate fs/open.c:338 [inline]
 __x64_sys_fallocate+0x75/0xc0 fs/open.c:338
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffea000136c158 of 8 bytes by task 17888 on cpu 0:
 page_mapping+0x13b/0x200 mm/util.c:694
 page_evictable mm/internal.h:84 [inline]
 __pagevec_lru_add_fn+0xb1/0x550 mm/swap.c:1048
 pagevec_lru_move_fn+0xff/0x190 mm/swap.c:227
 __pagevec_lru_add mm/swap.c:1070 [inline]
 lru_cache_add+0x10b/0x160 mm/swap.c:473
 add_to_page_cache_lru+0x150/0x1b0 mm/filemap.c:955
 page_cache_ra_unbounded+0x272/0x4c0 mm/readahead.c:222
 ondemand_readahead+0x560/0x780 mm/readahead.c:267
 page_cache_async_ra+0x1aa/0x1d0 mm/readahead.c:607
 page_cache_async_readahead include/linux/pagemap.h:862 [inline]
 generic_file_buffered_read+0x455/0x2110 mm/filemap.c:2239
 generic_file_read_iter+0x80/0x3d0 mm/filemap.c:2535
 ext4_file_read_iter+0x2d0/0x420 fs/ext4/file.c:74
 __kernel_read+0x307/0x560 fs/read_write.c:454
 integrity_kernel_read+0x4c/0x70 security/integrity/iint.c:191
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:484 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:515 [inline]
 ima_calc_file_hash+0x9c7/0x1430 security/integrity/ima/ima_crypto.c:580
 ima_collect_measurement+0x168/0x300 security/integrity/ima/ima_api.c:250
 process_measurement+0x9f1/0x1050 security/integrity/ima/ima_main.c:330
 ima_file_check+0x72/0xa0 security/integrity/ima/ima_main.c:498
 do_open fs/namei.c:3254 [inline]
 path_openat+0x1887/0x20a0 fs/namei.c:3369
 do_filp_open+0xbd/0x1d0 fs/namei.c:3396
 do_sys_openat2+0xa3/0x240 fs/open.c:1168
 do_sys_open fs/open.c:1184 [inline]
 __do_sys_open fs/open.c:1192 [inline]
 __se_sys_open fs/open.c:1188 [inline]
 __x64_sys_open+0xe2/0x110 fs/open.c:1188
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 17888 Comm: syz-executor.5 Not tainted 5.10.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
2020/11/02 11:50 upstream 3cea11cd5e3b 8bc4594f .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.