Skip to content

Commit 6498044

Browse files
committed
Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Pull bpf fixes from Alexei Starovoitov: "Two small fixes to selftests" * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Fix selftest btf_tag/btf_type_tag_percpu_vmlinux_helper failure selftests/bpf: Fix bpf selftest build error
2 parents d2fec01 + baa39c1 commit 6498044

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ int BPF_PROG(test_percpu_load, struct cgroup *cgrp, const char *path)
5757
SEC("tp_btf/cgroup_mkdir")
5858
int BPF_PROG(test_percpu_helper, struct cgroup *cgrp, const char *path)
5959
{
60-
struct cgroup_rstat_cpu *rstat;
60+
struct css_rstat_cpu *rstat;
6161
__u32 cpu;
6262

6363
cpu = bpf_get_smp_processor_id();
64-
rstat = (struct cgroup_rstat_cpu *)bpf_per_cpu_ptr(
64+
rstat = (struct css_rstat_cpu *)bpf_per_cpu_ptr(
6565
cgrp->self.rstat_cpu, cpu);
6666
if (rstat) {
6767
/* READ_ONCE */
68-
*(volatile int *)rstat;
68+
*(volatile long *)rstat;
6969
}
7070

7171
return 0;

tools/testing/selftests/bpf/test_kmods/bpf_testmod.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ int bpf_testmod_fentry_ok;
385385

386386
noinline ssize_t
387387
bpf_testmod_test_read(struct file *file, struct kobject *kobj,
388-
struct bin_attribute *bin_attr,
388+
const struct bin_attribute *bin_attr,
389389
char *buf, loff_t off, size_t len)
390390
{
391391
struct bpf_testmod_test_read_ctx ctx = {
@@ -465,7 +465,7 @@ ALLOW_ERROR_INJECTION(bpf_testmod_test_read, ERRNO);
465465

466466
noinline ssize_t
467467
bpf_testmod_test_write(struct file *file, struct kobject *kobj,
468-
struct bin_attribute *bin_attr,
468+
const struct bin_attribute *bin_attr,
469469
char *buf, loff_t off, size_t len)
470470
{
471471
struct bpf_testmod_test_write_ctx ctx = {
@@ -567,7 +567,7 @@ static void testmod_unregister_uprobe(void)
567567

568568
static ssize_t
569569
bpf_testmod_uprobe_write(struct file *file, struct kobject *kobj,
570-
struct bin_attribute *bin_attr,
570+
const struct bin_attribute *bin_attr,
571571
char *buf, loff_t off, size_t len)
572572
{
573573
unsigned long offset = 0;

0 commit comments

Comments
 (0)