selftests/bpf: fix test_sysctl_prog with alu32
authorAlexei Starovoitov <ast@kernel.org>
Tue, 28 Apr 2020 22:30:48 +0000 (15:30 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 28 Apr 2020 22:31:59 +0000 (15:31 -0700)
Similar to commit b7a0d65d80a0 ("bpf, testing: Workaround a verifier failure for test_progs")
fix test_sysctl_prog.c as well.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/test_sysctl_prog.c

index 2d0b0b82a78a2174637b5443ffcd13b54609fa80..50525235380e856d47960e528090d39620de9b07 100644 (file)
@@ -45,7 +45,7 @@ int sysctl_tcp_mem(struct bpf_sysctl *ctx)
        unsigned long tcp_mem[3] = {0, 0, 0};
        char value[MAX_VALUE_STR_LEN];
        unsigned char i, off = 0;
-       int ret;
+       volatile int ret;
 
        if (ctx->write)
                return 0;