syzbot


KCSAN: data-race in __pagevec_lru_add_fn / kcm_sendpage

Status: auto-closed as invalid on 2022/04/12 03:58
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 265d, last: 265d

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

write to 0xffffea00046450c8 of 8 bytes by task 30068 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
 lru_cache_add+0x37/0x50 mm/folio-compat.c:108
 shmem_getpage_gfp+0xc00/0x12c0 mm/shmem.c:1907
 shmem_getpage mm/shmem.c:149 [inline]
 shmem_file_read_iter+0x1b2/0x5d0 mm/shmem.c:2526
 call_read_iter include/linux/fs.h:2068 [inline]
 generic_file_splice_read+0x24f/0x330 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+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

read to 0xffffea00046450c8 of 8 bytes by task 30082 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]
 kcm_sendpage+0x6cd/0xbf0 net/kcm/kcmsock.c:837
 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 -> 0xffffea0004645088

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 30082 Comm: syz-executor.2 Not tainted 5.17.0-rc7-syzkaller-00020-gea4424be1688-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/03/08 03:51 upstream ea4424be1688 7bdd8b2c .config log report info KCSAN: data-race in __pagevec_lru_add_fn / kcm_sendpage
* Struck through repros no longer work on HEAD.