syzbot


KCSAN: data-race in dst_alloc / percpu_counter_add_batch (2)

Status: auto-closed as invalid on 2020/05/21 06:12
Subsystems: net
[Documentation on labels]
First crash: 1612d, last: 1498d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dst_alloc / percpu_counter_add_batch net 2 1632d 1636d 0/26 closed as invalid on 2019/11/19 13:24

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

write to 0xffff8880a0c92988 of 8 bytes by interrupt on cpu 0:
 percpu_counter_add_batch+0xbc/0x140 lib/percpu_counter.c:91
 percpu_counter_add include/linux/percpu_counter.h:55 [inline]
 dst_entries_add include/net/dst_ops.h:58 [inline]
 dst_destroy+0x1bd/0x1e0 net/core/dst.c:117
 dst_destroy_rcu+0x1c/0x30 net/core/dst.c:142
 rcu_do_batch kernel/rcu/tree.c:2218 [inline]
 rcu_core+0x533/0x9f0 kernel/rcu/tree.c:2445
 rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2454
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0xb5/0xd0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:546 [inline]
 smp_apic_timer_interrupt+0xe2/0x270 arch/x86/kernel/apic/apic.c:1146
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
 check_kcov_mode kernel/kcov.c:153 [inline]
 __sanitizer_cov_trace_pc+0x1c/0x50 kernel/kcov.c:187
 test_bit include/asm-generic/bitops/instrumented-non-atomic.h:111 [inline]
 PageUptodate include/linux/page-flags.h:496 [inline]
 filemap_map_pages+0x82c/0x9e0 mm/filemap.c:2618
 do_fault_around mm/memory.c:3634 [inline]
 do_read_fault mm/memory.c:3668 [inline]
 do_fault mm/memory.c:3802 [inline]
 handle_pte_fault mm/memory.c:4033 [inline]
 __handle_mm_fault+0x2974/0x2cf0 mm/memory.c:4163
 handle_mm_fault+0x21c/0x540 mm/memory.c:4200
 faultin_page mm/gup.c:659 [inline]
 __get_user_pages+0x485/0x1140 mm/gup.c:870
 populate_vma_page_range+0xdc/0x100 mm/gup.c:1181
 __mm_populate+0x168/0x2b0 mm/gup.c:1229
 mm_populate include/linux/mm.h:2343 [inline]
 vm_mmap_pgoff+0x185/0x190 mm/util.c:511
 ksys_mmap_pgoff+0x96/0x420 mm/mmap.c:1597
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880a0c92988 of 8 bytes by task 28912 on cpu 1:
 dst_entries_get_fast include/net/dst_ops.h:48 [inline]
 dst_alloc+0x51/0x133 net/core/dst.c:84
 ip6_dst_alloc+0x38/0x80 net/ipv6/route.c:355
 ip6_rt_cache_alloc+0x12b/0x480 net/ipv6/route.c:1344
 ip6_pol_route+0x5f4/0x740 net/ipv6/route.c:2223
 ip6_pol_route_output+0x44/0x60 net/ipv6/route.c:2455
 fib6_rule_lookup+0x96/0x450 net/ipv6/fib6_rules.c:114
 ip6_route_output_flags_noref+0x163/0x220 net/ipv6/route.c:2487
 ip6_route_output_flags+0x4d/0x1a0 net/ipv6/route.c:2500
 ip6_dst_lookup_tail+0x25d/0xc50 net/ipv6/ip6_output.c:1052
 ip6_dst_lookup_flow+0x5c/0x110 net/ipv6/ip6_output.c:1153
 rawv6_sendmsg+0x9fb/0x2320 net/ipv6/raw.c:928
 inet_sendmsg+0x69/0x90 net/ipv4/af_inet.c:807
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0x98/0xc0 net/socket.c:672
 ____sys_sendmsg+0x207/0x4c0 net/socket.c:2343
 ___sys_sendmsg+0xb5/0x100 net/socket.c:2397
 __sys_sendmmsg+0x10e/0x310 net/socket.c:2487
 __do_sys_sendmmsg net/socket.c:2516 [inline]
 __se_sys_sendmmsg net/socket.c:2513 [inline]
 __x64_sys_sendmmsg+0x60/0x80 net/socket.c:2513
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 28912 Comm: syz-executor.4 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/12 06:11 https://github.com/google/ktsan.git kcsan 941e0d917bbf d850e9d0 .config console log report ci2-upstream-kcsan-gce
2020/02/17 17:13 https://github.com/google/ktsan.git kcsan b12d66a6c34f 72bfa6f2 .config console log report ci2-upstream-kcsan-gce
2020/02/06 18:42 https://github.com/google/ktsan.git kcsan 245a43005292 5be3a391 .config console log report ci2-upstream-kcsan-gce
2020/01/24 02:19 https://github.com/google/ktsan.git kcsan 245a43005292 11ebf937 .config console log report ci2-upstream-kcsan-gce
2020/01/19 00:04 https://github.com/google/ktsan.git kcsan 245a43005292 bc8bc756 .config console log report ci2-upstream-kcsan-gce
2020/01/17 11:05 https://github.com/google/ktsan.git kcsan 245a43005292 3de7aabb .config console log report ci2-upstream-kcsan-gce
2019/11/29 13:42 https://github.com/google/ktsan.git kcsan ef798c30ba4e 4f7e1d0f .config console log report ci2-upstream-kcsan-gce
2019/11/20 00:36 https://github.com/google/ktsan.git kcsan 5863cc791e4c 432c7650 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.