From: Alexei Starovoitov <ast@kernel.org>
Date: Tue, 28 Apr 2020 15:30:48 -0700
Subject: selftests/bpf: fix test_sysctl_prog with alu32
Patch-mainline: v5.8-rc1
Git-commit: 9b329d0dbe413bf46eb5010edd06b3076960a60a
References: bsc#1177028
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>
Acked-by: Gary Lin <glin@suse.com>
---
tools/testing/selftests/bpf/progs/test_sysctl_prog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/tools/testing/selftests/bpf/progs/test_sysctl_prog.c
+++ b/tools/testing/selftests/bpf/progs/test_sysctl_prog.c
@@ -45,7 +45,7 @@ int sysctl_tcp_mem(struct bpf_sysctl *ct
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;