syzbot


KCSAN: data-race in __folio_activate / tcp_build_frag

Status: auto-closed as invalid on 2022/06/20 23:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 200d, last: 200d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __folio_activate / tcp_build_frag

write to 0xffffea000488da88 of 8 bytes by task 8313 on cpu 0:
 list_del include/linux/list.h:149 [inline]
 lruvec_del_folio include/linux/mm_inline.h:135 [inline]
 __folio_activate+0x218/0x760 mm/swap.c:315
 __activate_page+0x45/0xf0 mm/swap.c:329
 pagevec_lru_move_fn+0x230/0x500 mm/swap.c:207
 folio_activate mm/swap.c:355 [inline]
 folio_mark_accessed+0x30e/0x380 mm/swap.c:436
 filemap_read+0x1081/0x1400 mm/filemap.c:2721
 generic_file_read_iter+0x72/0x320 mm/filemap.c:2825
 call_read_iter include/linux/fs.h:2044 [inline]
 generic_file_splice_read+0x1de/0x2c0 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2ac/0x660 fs/splice.c:870
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1246
 __do_sys_sendfile64 fs/read_write.c:1311 [inline]
 __se_sys_sendfile64 fs/read_write.c:1297 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1297
 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+0x44/0xae

read to 0xffffea000488da88 of 8 bytes by task 8320 on cpu 1:
 page_is_pfmemalloc include/linux/mm.h:1788 [inline]
 __skb_fill_page_desc include/linux/skbuff.h:2410 [inline]
 skb_fill_page_desc include/linux/skbuff.h:2431 [inline]
 tcp_build_frag+0x5e1/0xa30 net/ipv4/tcp.c:998
 do_tcp_sendpages+0x3e8/0xaf0 net/ipv4/tcp.c:1055
 tcp_sendpage_locked net/ipv4/tcp.c:1120 [inline]
 tcp_sendpage+0x89/0xb0 net/ipv4/tcp.c:1130
 inet_sendpage+0x7f/0xc0 net/ipv4/af_inet.c:833
 kernel_sendpage+0x184/0x300 net/socket.c:3492
 sock_sendpage+0x5a/0x70 net/socket.c:1007
 pipe_to_sendpage+0x128/0x160 fs/splice.c:364
 splice_from_pipe_feed fs/splice.c:418 [inline]
 __splice_from_pipe+0x222/0x4d0 fs/splice.c:562
 splice_from_pipe fs/splice.c:597 [inline]
 generic_splice_sendpage+0x89/0xc0 fs/splice.c:746
 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:1246
 __do_sys_sendfile64 fs/read_write.c:1311 [inline]
 __se_sys_sendfile64 fs/read_write.c:1297 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1297
 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+0x44/0xae

value changed: 0xffffea00048c0e08 -> 0xffffea00047c5808

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

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/05/16 23:34 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in __folio_activate / tcp_build_frag
* Struck through repros no longer work on HEAD.