syzbot


KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages

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

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

write to 0xffffea00048fe148 of 8 bytes by task 28288 on cpu 1:
 __list_add include/linux/list.h:73 [inline]
 list_add include/linux/list.h:88 [inline]
 lruvec_add_folio include/linux/mm_inline.h:102 [inline]
 __pagevec_lru_add_fn+0x2ae/0x380 mm/swap.c:1053
 __pagevec_lru_add+0x1c3/0x270 mm/swap.c:1071
 folio_add_lru+0x11a/0x160 mm/swap.c:469
 filemap_add_folio+0xf8/0x150 mm/filemap.c:965
 __filemap_get_folio+0x4c4/0x690 mm/filemap.c:2001
 pagecache_get_page+0x26/0xe0 mm/folio-compat.c:125
 grab_cache_page_write_begin+0x3f/0x50 mm/folio-compat.c:139
 ext4_da_write_begin+0x292/0x4b0 fs/ext4/inode.c:2941
 generic_perform_write+0x1c8/0x400 mm/filemap.c:3765
 ext4_buffered_write_iter+0x19d/0x290 fs/ext4/file.c:268
 ext4_file_write_iter+0x227/0xda0
 call_write_iter include/linux/fs.h:2074 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffea00048fe148 of 8 bytes by task 28298 on cpu 0:
 page_is_pfmemalloc include/linux/mm.h:1780 [inline]
 __skb_fill_page_desc include/linux/skbuff.h:2258 [inline]
 skb_fill_page_desc include/linux/skbuff.h:2279 [inline]
 tcp_build_frag net/ipv4/tcp.c:998 [inline]
 do_tcp_sendpages+0xace/0x15d0 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 net/socket.c:3492 [inline]
 sock_sendpage+0x1bb/0x230 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+0x207/0x500 fs/splice.c:562
 splice_from_pipe fs/splice.c:597 [inline]
 generic_splice_sendpage+0x94/0xd0 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/0x650 fs/splice.c:891
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x675/0xc40 fs/read_write.c:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000000 -> 0xffffea00048fe108

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 28298 Comm: syz-executor.3 Not tainted 5.17.0-rc6-syzkaller-00228-gac84e82f78cb-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (6):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/03/05 16:39 upstream ac84e82f78cb 45a13a73 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages
ci2-upstream-kcsan-gce 2022/02/03 05:10 upstream 27bb0b18c208 4ebb2798 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages
ci2-upstream-kcsan-gce 2022/01/30 04:10 upstream f8c7e4ede46f 495e00c5 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages
ci2-upstream-kcsan-gce 2022/01/16 07:56 upstream d0a231f01e5b 723cfaf0 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages
ci2-upstream-kcsan-gce 2021/12/21 09:30 upstream 6e0567b73052 a938f0b8 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages
ci2-upstream-kcsan-gce 2021/12/17 03:28 upstream fa36bbe6d43f 44068e19 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / do_tcp_sendpages
* Struck through repros no longer work on HEAD.