syzbot


KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags (3)

Status: auto-closed as invalid on 2022/07/14 13:43
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 176d, last: 176d
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) 2 264d 285d 0/24 auto-closed as invalid on 2022/04/18 06:57
upstream KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags 1 400d 400d 0/24 auto-closed as invalid on 2021/12/02 14:36

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

write to 0xffffea0004811f08 of 8 bytes by task 1408 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
 find_or_create_page include/linux/pagemap.h:615 [inline]
 grow_dev_page+0x7a/0x600 fs/buffer.c:946
 grow_buffers fs/buffer.c:1011 [inline]
 __getblk_slow fs/buffer.c:1038 [inline]
 __getblk_gfp+0x112/0x1c0 fs/buffer.c:1333
 __getblk include/linux/buffer_head.h:381 [inline]
 jbd2_journal_get_descriptor_buffer+0xa6/0x1d0 fs/jbd2/journal.c:1016
 journal_submit_commit_record+0x80/0x4b0 fs/jbd2/commit.c:133
 jbd2_journal_commit_transaction+0x1f38/0x3180 fs/jbd2/commit.c:916
 kjournald2+0x253/0x460 fs/jbd2/journal.c:213
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

read to 0xffffea0004811f08 of 8 bytes by task 30164 on cpu 1:
 page_is_pfmemalloc include/linux/mm.h:1794 [inline]
 __skb_fill_page_desc include/linux/skbuff.h:2559 [inline]
 skb_fill_page_desc include/linux/skbuff.h:2580 [inline]
 skb_append_pagefrags+0x1e9/0x440 net/core/skbuff.c:3841
 unix_stream_sendpage+0x45e/0x990 net/unix/af_unix.c:2290
 kernel_sendpage+0x184/0x300 net/socket.c:3571
 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+0x3ad/0x900 fs/read_write.c:1262
 __do_sys_sendfile64 fs/read_write.c:1327 [inline]
 __se_sys_sendfile64 fs/read_write.c:1313 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1313
 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+0x46/0xb0

value changed: 0x0000000000000000 -> 0xffffea0004ea3248

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 30164 Comm: syz-executor.5 Not tainted 5.19.0-rc1-syzkaller-00024-g6bfb56e93bce-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/06/09 13:32 upstream 6bfb56e93bce 0d5abf15 .config log report info KCSAN: data-race in __pagevec_lru_add_fn / skb_append_pagefrags
* Struck through repros no longer work on HEAD.