syzbot


KCSAN: data-race in ext4_setattr / ondemand_readahead (3)

Status: auto-closed as invalid on 2021/09/14 04:27
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 550d, last: 477d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_setattr / ondemand_readahead 2 795d 804d 0/24 auto-closed as invalid on 2020/11/01 00:03
upstream KCSAN: data-race in ext4_setattr / ondemand_readahead (2) 1 593d 593d 0/24 auto-closed as invalid on 2021/05/21 13:38
upstream KCSAN: data-race in ext4_setattr / ondemand_readahead (4) 3 395d 439d 0/24 auto-closed as invalid on 2021/12/05 11:41

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_setattr / ondemand_readahead

write to 0xffff888106ad2600 of 8 bytes by task 29700 on cpu 0:
 i_size_write include/linux/fs.h:871 [inline]
 ext4_setattr+0xd54/0xec0 fs/ext4/inode.c:5481
 notify_change+0x8a3/0xa80 fs/attr.c:398
 do_truncate+0xe8/0x130 fs/open.c:64
 handle_truncate fs/namei.c:3030 [inline]
 do_open fs/namei.c:3378 [inline]
 path_openat+0x19b2/0x1f20 fs/namei.c:3507
 do_filp_open+0xe9/0x200 fs/namei.c:3534
 do_sys_openat2+0xa3/0x250 fs/open.c:1204
 do_sys_open fs/open.c:1220 [inline]
 __do_sys_creat fs/open.c:1294 [inline]
 __se_sys_creat fs/open.c:1288 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1288
 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 0xffff888106ad2600 of 8 bytes by task 29684 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 do_page_cache_ra mm/readahead.c:254 [inline]
 ondemand_readahead+0x51b/0x7b0 mm/readahead.c:550
 page_cache_sync_ra+0xaf/0xe0 mm/readahead.c:578
 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
 ext4_file_read_iter+0x1db/0x290 fs/ext4/file.c:73
 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

value changed: 0x00000000000f2600 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 29684 Comm: syz-executor.1 Not tainted 5.14.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/08/10 04:23 upstream 9a73fa375d58 6972b106 .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/07/31 17:40 upstream c7d102232649 6c236867 .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/07/27 23:52 upstream 7d549995d4e0 17d6ab15 .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/07/21 06:16 upstream 8cae8cd89f05 1b201b48 .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/07/18 06:21 upstream 1d67c8d993ba f115ae98 .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/06/25 02:45 upstream 4a09d388f2ab 0edbbe31 .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/06/22 01:13 upstream a96bfed64c89 aba2b2fb .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
ci2-upstream-kcsan-gce 2021/05/29 18:15 upstream f956cb99b938 325a8dab .config log report info KCSAN: data-race in ext4_setattr / ondemand_readahead
* Struck through repros no longer work on HEAD.