xref: /linux/tools/testing/selftests/bpf/progs/ksym_race.c (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <vmlinux.h>
3 #include <bpf/bpf_helpers.h>
4 
5 extern int bpf_testmod_ksym_percpu __ksym;
6 
7 SEC("tc")
ksym_fail(struct __sk_buff * ctx)8 int ksym_fail(struct __sk_buff *ctx)
9 {
10 	return *(int *)bpf_this_cpu_ptr(&bpf_testmod_ksym_percpu);
11 }
12 
13 char _license[] SEC("license") = "GPL";
14