syzbot


KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (2)

Status: auto-closed as invalid on 2021/02/23 14:15
Subsystems: bpf
[Documentation on labels]
First crash: 1219d, last: 1192d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (3) bpf 91 510d 865d 0/26 auto-obsoleted due to no activity on 2023/01/14 15:11
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (4) bpf 1 441d 441d 0/26 auto-obsoleted due to no activity on 2023/03/24 04:11
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (5) bpf 13 305d 366d 23/26 fixed on 2023/09/28 17:51
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem bpf 12 1296d 1378d 0/26 auto-closed as invalid on 2020/11/11 05:04

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

write to 0xffff88810a5af863 of 1 bytes by task 17647 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline]
 __htab_lru_percpu_map_update_elem+0x414/0x780 kernel/bpf/hashtab.c:1236
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:1972
 bpf_map_update_value+0x1dd/0x300 kernel/bpf/syscall.c:176
 generic_map_update_batch+0x344/0x450 kernel/bpf/syscall.c:1350
 bpf_map_do_batch+0x2a8/0x310 kernel/bpf/syscall.c:3988
 __do_sys_bpf+0x8a3/0x99c0 kernel/bpf/syscall.c:4444
 __se_sys_bpf kernel/bpf/syscall.c:4338 [inline]
 __x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4338
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810a5af863 of 1 bytes by task 17655 on cpu 1:
 bpf_lru_node_is_ref kernel/bpf/bpf_lru_list.c:44 [inline]
 __bpf_lru_list_rotate_inactive kernel/bpf/bpf_lru_list.c:190 [inline]
 __bpf_lru_list_rotate+0x537/0x780 kernel/bpf/bpf_lru_list.c:242
 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:329 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline]
 bpf_lru_pop_free+0x79f/0xea0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:264 [inline]
 __htab_lru_percpu_map_update_elem+0xe0/0x780 kernel/bpf/hashtab.c:1220
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:1972
 bpf_map_update_value+0x1dd/0x300 kernel/bpf/syscall.c:176
 generic_map_update_batch+0x344/0x450 kernel/bpf/syscall.c:1350
 bpf_map_do_batch+0x2a8/0x310 kernel/bpf/syscall.c:3988
 __do_sys_bpf+0x8a3/0x99c0 kernel/bpf/syscall.c:4444
 __se_sys_bpf kernel/bpf/syscall.c:4338 [inline]
 __x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4338
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 17655 Comm: syz-executor.3 Not tainted 5.11.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/19 14:07 upstream 1e2a199f6ccd 63631df1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem
2020/12/23 14:03 upstream 614cb5894306 c2c1d1dd .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.