summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/ksym_race.c
blob: def97f2fed9096178eb1d5acf61a8b6a5fcc6f5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// SPDX-License-Identifier: GPL-2.0
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>

extern int bpf_testmod_ksym_percpu __ksym;

SEC("tc")
int ksym_fail(struct __sk_buff *ctx)
{
	return *(int *)bpf_this_cpu_ptr(&bpf_testmod_ksym_percpu);
}

char _license[] SEC("license") = "GPL";