syzbot


KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag

Status: auto-closed as invalid on 2022/09/04 08:16
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 202d, last: 125d

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

write to 0xffffea00045e64c8 of 8 bytes by task 31306 on cpu 0:
 __list_add include/linux/list.h:73 [inline]
 list_add include/linux/list.h:88 [inline]
 lruvec_add_folio include/linux/mm_inline.h:105 [inline]
 __pagevec_lru_add_fn+0x446/0x520 mm/swap.c:1042
 __pagevec_lru_add+0x1c6/0x320 mm/swap.c:1060
 folio_add_lru+0x112/0x160 mm/swap.c:467
 filemap_add_folio+0xf8/0x150 mm/filemap.c:974
 __filemap_get_folio+0x4bd/0x680 mm/filemap.c:2003
 pagecache_get_page+0x26/0x190 mm/folio-compat.c:126
 grab_cache_page_write_begin+0x2a/0x30 mm/folio-compat.c:138
 ext4_da_write_begin+0x2dd/0x5f0 fs/ext4/inode.c:2977
 generic_perform_write+0x1d4/0x3f0 mm/filemap.c:3779
 ext4_buffered_write_iter+0x222/0x330 fs/ext4/file.c:270
 ext4_file_write_iter+0x2e3/0x1210
 call_write_iter include/linux/fs.h:2058 [inline]
 new_sync_write fs/read_write.c:504 [inline]
 vfs_write+0x71c/0x890 fs/read_write.c:591
 ksys_write+0xe8/0x1a0 fs/read_write.c:644
 __do_sys_write fs/read_write.c:656 [inline]
 __se_sys_write fs/read_write.c:653 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:653
 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+0x63/0xcd

read to 0xffffea00045e64c8 of 8 bytes by task 31322 on cpu 1:
 page_is_pfmemalloc include/linux/mm.h:1798 [inline]
 __skb_fill_page_desc include/linux/skbuff.h:2559 [inline]
 skb_fill_page_desc include/linux/skbuff.h:2580 [inline]
 tcp_build_frag+0x5e1/0xa30 net/ipv4/tcp.c:997
 do_tcp_sendpages+0x3e8/0xaf0 net/ipv4/tcp.c:1054
 tcp_sendpage_locked net/ipv4/tcp.c:1119 [inline]
 tcp_sendpage+0x89/0xb0 net/ipv4/tcp.c:1129
 inet_sendpage+0x7f/0xc0 net/ipv4/af_inet.c:833
 kernel_sendpage+0x184/0x300 net/socket.c:3567
 sock_sendpage+0x5a/0x70 net/socket.c:1054
 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+0x3bf/0x910 fs/read_write.c:1262
 __do_sys_sendfile64 fs/read_write.c:1330 [inline]
 __se_sys_sendfile64 fs/read_write.c:1316 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1316
 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+0x63/0xcd

value changed: 0x0000000000000000 -> 0xffffea00045dd948

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 31322 Comm: syz-executor.0 Not tainted 5.19.0-rc8-syzkaller-00155-g6a010258447d-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (14):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/07/31 08:13 upstream 6a010258447d fef302b1 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/07/24 03:50 upstream 515f71412bb7 22343af4 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/07/21 05:27 upstream 353f7988dd84 88cb1383 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/07/18 03:08 upstream ff6992735ade 95cb00d1 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/07/08 03:04 upstream e8a4e1c1bb69 bff65f44 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/07/01 19:15 upstream a175eca0f3d7 1434eec0 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/27 13:08 upstream 03c765b0e3b4 a371c43c .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/27 02:00 upstream 82708bb1eb9e a371c43c .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/17 23:11 upstream 462abc9de7a1 8f633d84 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/17 10:03 upstream 47700948a4ab cb58b3b2 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/14 06:30 upstream b13baccc3850 0f087040 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/13 05:46 upstream 997952851843 0d5abf15 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/06/10 20:55 upstream 874c8ca1e60b 0d5abf15 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
ci2-upstream-kcsan-gce 2022/05/14 18:53 upstream ec7f49619d8e 744a39e2 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / tcp_build_frag
* Struck through repros no longer work on HEAD.