syzbot


KCSAN: data-race in iomap_dio_complete / page_cache_delete

Status: auto-closed as invalid on 2022/08/08 00:29
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 155d, last: 155d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in iomap_dio_complete / page_cache_delete (2) 1 71d 71d 0/24 auto-obsoleted due to no activity on 2022/10/30 19:43

Sample crash report:
==================================================================
BUG: KCSAN: data-race in iomap_dio_complete / page_cache_delete

read-write to 0xffff8881370d2d00 of 8 bytes by task 12349 on cpu 0:
 page_cache_delete+0x32c/0x360 mm/filemap.c:145
 __filemap_remove_folio+0x3b/0xf0 mm/filemap.c:223
 __remove_mapping+0x42a/0x530 mm/vmscan.c:1305
 shrink_page_list+0x122b/0x1f30 mm/vmscan.c:1912
 shrink_inactive_list+0x433/0x740 mm/vmscan.c:2386
 shrink_list mm/vmscan.c:2616 [inline]
 shrink_lruvec+0x3aa/0x6d0 mm/vmscan.c:2933
 shrink_node_memcgs+0x23e/0x400 mm/vmscan.c:3122
 shrink_node+0x8c3/0x10f0 mm/vmscan.c:3245
 shrink_zones+0x2c1/0x5d0 mm/vmscan.c:3482
 do_try_to_free_pages+0x165/0x720 mm/vmscan.c:3540
 try_to_free_mem_cgroup_pages+0x1cd/0x420 mm/vmscan.c:3854
 try_charge_memcg+0x270/0x960 mm/memcontrol.c:2622
 try_charge mm/memcontrol.c:2757 [inline]
 mem_cgroup_charge_skmem+0x4d/0x130 mm/memcontrol.c:7051
 sock_reserve_memory+0xaf/0x1e0 net/core/sock.c:1016
 sock_setsockopt+0xeeb/0x1a40 net/core/sock.c:1481
 __sys_setsockopt+0x242/0x2b0 net/socket.c:2250
 __do_sys_setsockopt net/socket.c:2265 [inline]
 __se_sys_setsockopt net/socket.c:2262 [inline]
 __x64_sys_setsockopt+0x62/0x70 net/socket.c:2262
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff8881370d2d00 of 8 bytes by task 12348 on cpu 1:
 iomap_dio_complete+0x332/0x3e0 fs/iomap/direct-io.c:113
 iomap_dio_rw+0x5e/0x80 fs/iomap/direct-io.c:693
 ext4_dio_write_iter fs/ext4/file.c:566 [inline]
 ext4_file_write_iter+0xaa9/0x1210 fs/ext4/file.c:677
 do_iter_readv_writev+0x27b/0x300
 do_iter_write+0x16f/0x5c0 fs/read_write.c:868
 vfs_iter_write+0x4c/0x70 fs/read_write.c:909
 iter_file_splice_write+0x44a/0x7c0 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x660 fs/splice.c:891
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1262
 __do_sys_sendfile64 fs/read_write.c:1327 [inline]
 __se_sys_sendfile64 fs/read_write.c:1313 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1313
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x0000000000000074 -> 0x0000000000000063

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12348 Comm: syz-executor.3 Not tainted 5.19.0-rc4-syzkaller-00219-g20855e4cb361-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/07/04 00:22 upstream 20855e4cb361 1434eec0 .config log report info KCSAN: data-race in iomap_dio_complete / page_cache_delete
* Struck through repros no longer work on HEAD.