summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rseq/rseq.c
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2022-01-24 20:12:42 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-02-02 15:11:34 +0300
commit94b80a19ebfe347a01301d750040a61c38200e2b (patch)
tree6379b75274ddf02fd73ce5b84f5100e41bbaa34c /tools/testing/selftests/rseq/rseq.c
parent930378d056eac2c96407b02aafe4938d0ac9cc37 (diff)
downloadlinux-94b80a19ebfe347a01301d750040a61c38200e2b.tar.xz
selftests/rseq: Remove volatile from __rseq_abi
This is done in preparation for the selftest uplift to become compatible with glibc-2.35. All accesses to the __rseq_abi fields are volatile, but remove the volatile from the TLS variable declaration, otherwise we are stuck with volatile for the upcoming rseq_get_abi() helper. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220124171253.22072-5-mathieu.desnoyers@efficios.com
Diffstat (limited to 'tools/testing/selftests/rseq/rseq.c')
-rw-r--r--tools/testing/selftests/rseq/rseq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c
index bfe1b2692ffc..1f905b60728a 100644
--- a/tools/testing/selftests/rseq/rseq.c
+++ b/tools/testing/selftests/rseq/rseq.c
@@ -30,7 +30,7 @@
#include "../kselftest.h"
#include "rseq.h"
-__thread volatile struct rseq_abi __rseq_abi = {
+__thread struct rseq_abi __rseq_abi = {
.cpu_id = RSEQ_ABI_CPU_ID_UNINITIALIZED,
};
@@ -92,7 +92,7 @@ int rseq_register_current_thread(void)
goto end;
}
if (errno != EBUSY)
- __rseq_abi.cpu_id = RSEQ_ABI_CPU_ID_REGISTRATION_FAILED;
+ RSEQ_WRITE_ONCE(__rseq_abi.cpu_id, RSEQ_ABI_CPU_ID_REGISTRATION_FAILED);
ret = -1;
__rseq_refcount--;
end: