syzbot


KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags

Status: auto-closed as invalid on 2021/12/02 14:36
Subsystems: mm
[Documentation on labels]
First crash: 910d, last: 910d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags (2) mm 2 773d 794d 0/26 auto-closed as invalid on 2022/04/18 06:57
upstream KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags (3) mm 1 686d 686d 0/26 auto-closed as invalid on 2022/07/14 13:43

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

write to 0xffffea0004d16648 of 8 bytes by task 9590 on cpu 1:
 __list_add include/linux/list.h:71 [inline]
 list_add include/linux/list.h:86 [inline]
 add_page_to_lru_list include/linux/mm_inline.h:88 [inline]
 __pagevec_lru_add_fn+0x392/0x490 mm/swap.c:1034
 __pagevec_lru_add+0x189/0x240 mm/swap.c:1052
 lru_cache_add+0x121/0x150 mm/swap.c:453
 shmem_getpage_gfp+0xcb9/0x13d0 mm/shmem.c:1940
 shmem_getpage mm/shmem.c:151 [inline]
 shmem_write_begin+0x7e/0x100 mm/shmem.c:2469
 generic_perform_write+0x1b8/0x3e0 mm/filemap.c:3770
 __generic_file_write_iter+0x174/0x310 mm/filemap.c:3897
 generic_file_write_iter+0x75/0x130 mm/filemap.c:3929
 call_write_iter include/linux/fs.h:2163 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x7bc/0x900 fs/read_write.c:594
 ksys_write+0xd9/0x190 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:656
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffea0004d16648 of 8 bytes by task 9702 on cpu 0:
 page_is_pfmemalloc include/linux/mm.h:1679 [inline]
 __skb_fill_page_desc include/linux/skbuff.h:2189 [inline]
 skb_fill_page_desc include/linux/skbuff.h:2210 [inline]
 skb_append_pagefrags+0x1d0/0x2e0 net/core/skbuff.c:3793
 unix_stream_sendpage+0x471/0xb40 net/unix/af_unix.c:2203
 kernel_sendpage+0x187/0x200 net/socket.c:3504
 sock_sendpage+0x5a/0x70 net/socket.c:1003
 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+0x63e/0xbb0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1308 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0xb9/0x140 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000000 -> 0xffffea0004d73888

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/28 14:34 upstream 1fc596a56b33 be531bb4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags
* Struck through repros no longer work on HEAD.