syzbot


KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf (6)

Status: moderation: reported on 2023/12/09 00:07
Subsystems: block trace
[Documentation on labels]
Reported-by: syzbot+ccce44144bfcb4db1023@syzkaller.appspotmail.com
First crash: 222d, last: 10d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf (2) block trace 3 1208d 1180d 0/26 auto-closed as invalid on 2020/12/21 11:49
upstream KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf (4) block trace 11 559d 712d 0/26 auto-closed as invalid on 2022/09/24 02:55
upstream KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf (3) block trace 6 760d 848d 0/26 auto-closed as invalid on 2022/03/06 18:39
upstream KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf (5) block trace 19 410d 502d 0/26 auto-obsoleted due to no activity on 2023/04/10 19:57
upstream KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf block trace 17 1488d 1584d 0/26 auto-closed as invalid on 2020/04/13 07:50

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

write to 0xffff88813c3b1c38 of 8 bytes by task 2738 on cpu 0:
 relay_switch_subbuf+0x399/0x3a0 kernel/relay.c:708
 relay_reserve include/linux/relay.h:248 [inline]
 __blk_add_trace+0x665/0x720 kernel/trace/blktrace.c:276
 blk_add_trace_bio kernel/trace/blktrace.c:903 [inline]
 blk_add_trace_bio_queue+0x12c/0x140 kernel/trace/blktrace.c:935
 trace_block_bio_queue include/trace/events/block.h:383 [inline]
 submit_bio_noacct_nocheck+0x57d/0x5e0 block/blk-core.c:699
 submit_bio_noacct+0x67d/0x830 block/blk-core.c:826
 submit_bio+0x212/0x220 block/blk-core.c:868
 submit_bh_wbc+0x2ca/0x310 fs/buffer.c:2800
 submit_bh+0x1c/0x20 fs/buffer.c:2805
 jbd2_journal_commit_transaction+0x15e7/0x33b0 fs/jbd2/commit.c:731
 kjournald2+0x242/0x420 fs/jbd2/journal.c:201
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

write to 0xffff88813c3b1c38 of 8 bytes by task 4415 on cpu 1:
 relay_switch_subbuf+0x399/0x3a0 kernel/relay.c:708
 relay_reserve include/linux/relay.h:248 [inline]
 __blk_add_trace+0x665/0x720 kernel/trace/blktrace.c:276
 blk_add_trace_bio kernel/trace/blktrace.c:903 [inline]
 blk_add_trace_bio_backmerge+0x12c/0x140 kernel/trace/blktrace.c:923
 trace_block_bio_backmerge include/trace/events/block.h:361 [inline]
 bio_attempt_back_merge+0x4af/0x510 block/blk-merge.c:981
 blk_attempt_bio_merge+0x43d/0x480 block/blk-merge.c:1064
 blk_attempt_plug_merge+0xb4/0xf0 block/blk-merge.c:1111
 blk_mq_attempt_bio_merge block/blk-mq.c:2874 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2894 [inline]
 blk_mq_submit_bio+0x323/0xe30 block/blk-mq.c:3001
 __submit_bio+0x11c/0x350 block/blk-core.c:608
 __submit_bio_noacct_mq block/blk-core.c:687 [inline]
 submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:716
 submit_bio_noacct+0x67d/0x830 block/blk-core.c:826
 submit_bio+0x212/0x220 block/blk-core.c:868
 swap_writepage_bdev_async mm/page_io.c:371 [inline]
 __swap_writepage+0x612/0xc40 mm/page_io.c:389
 swap_writepage+0xa9/0x150 mm/page_io.c:209
 pageout mm/vmscan.c:654 [inline]
 shrink_folio_list+0x196b/0x2570 mm/vmscan.c:1316
 shrink_inactive_list mm/vmscan.c:1914 [inline]
 shrink_list mm/vmscan.c:2155 [inline]
 shrink_lruvec+0xd80/0x17a0 mm/vmscan.c:5681
 shrink_node_memcgs mm/vmscan.c:5867 [inline]
 shrink_node+0xac3/0x15d0 mm/vmscan.c:5902
 shrink_zones mm/vmscan.c:6141 [inline]
 do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6203
 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6518
 try_charge_memcg+0x280/0xd20 mm/memcontrol.c:2782
 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301
 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3327
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584
 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
 alloc_pages+0xe0/0x100 mm/mempolicy.c:2204
 vm_area_alloc_pages mm/vmalloc.c:3063 [inline]
 __vmalloc_area_node mm/vmalloc.c:3139 [inline]
 __vmalloc_node_range+0x6ee/0xec0 mm/vmalloc.c:3320
 kvmalloc_node+0x121/0x170 mm/util.c:642
 kvmalloc include/linux/slab.h:728 [inline]
 xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192
 do_replace net/ipv6/netfilter/ip6_tables.c:1139 [inline]
 do_ip6t_set_ctl+0x633/0x1800 net/ipv6/netfilter/ip6_tables.c:1636
 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x11c/0x130 net/ipv6/ipv6_sockglue.c:997
 udpv6_setsockopt+0x95/0xa0 net/ipv6/udp.c:1694
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3716
 do_sock_setsockopt net/socket.c:2311 [inline]
 __sys_setsockopt+0x1d4/0x240 net/socket.c:2334
 __do_sys_setsockopt net/socket.c:2343 [inline]
 __se_sys_setsockopt net/socket.c:2340 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2340
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000000030 -> 0x0000000000000040

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 4415 Comm: syz-executor.3 Not tainted 6.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================
syz-executor.3 (4415) used greatest stack depth: 7912 bytes left

Crashes (38):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/19 22:59 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/13 14:21 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/08 11:47 upstream 047371968ffc 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/06 00:13 upstream 54be6c6c5ae8 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/02 13:59 upstream 021533194476 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/02 10:13 upstream 5c24e4e9e708 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/01 13:17 upstream 6764c317b6bb 81024119 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/01 01:30 upstream 6764c317b6bb 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/02/01 01:09 upstream 6764c317b6bb 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/01/26 22:58 upstream ecb1b8288dc7 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/01/24 02:28 upstream 7ed2632ec7d7 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/01/19 02:27 upstream 86c4d58a99ab 21772ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/01/14 01:56 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2024/01/06 06:31 upstream a4ab2706bb12 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/12/15 16:36 upstream 3f7168591ebf 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/12/02 21:28 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/11/16 15:05 upstream 7475e51b8796 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/11/13 18:49 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/25 08:24 upstream 4f82870119a4 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/20 14:58 upstream ce55c22ec8b2 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/20 12:24 upstream ce55c22ec8b2 a42250d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/19 11:02 upstream dd72f9c7e512 42e1d524 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/07 06:43 upstream 82714078aee4 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/05 23:50 upstream 3006adf3be79 db17ad9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/10/01 02:14 upstream 3b517966c561 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/09/22 22:40 upstream 8018e02a8703 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/09/22 18:30 upstream 27bbf45eae9c 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/09/21 15:37 upstream 42dc814987c1 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/09/18 06:57 upstream ce9ecca0238b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/09/17 16:24 upstream f0b0d403eabb 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/08/16 12:43 upstream 4853c74bd7ab 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/08/14 21:32 upstream 2ccdd1b13c59 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/08/13 23:02 upstream a785fd28d31f 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/08/12 01:58 upstream 9106536c1aa3 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/07/27 10:06 upstream 0a8db05b571a 41fe1bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/07/27 02:15 upstream 5f0bc0b042fc 41fe1bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/07/24 02:25 upstream 6eaae1980760 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
2023/07/23 12:24 upstream c2782531397f 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf
* Struck through repros no longer work on HEAD.