diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2022-11-22 15:39:03 -0500 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-12-27 12:52:10 +0100 |
commit | 4842dadfc66f627083ec46c4e9a426e805c765f3 (patch) | |
tree | aa44c044500b4af54975ffc37bc49dbf241a51b4 /fs/binfmt_elf.c | |
parent | 8ad075c2eb1f6b4b33436144ea1ef2619f3b6398 (diff) |
selftests/rseq: Fix: Fail thread registration when CONFIG_RSEQ=n
When linking the selftests against a libc which does not handle rseq
registration (before 2.35), rseq thread registration silently succeed
even with CONFIG_RSEQ=n because it erroneously thinks that libc is
handling rseq registration.
This is caused by setting the rseq ownership flag only after the
rseq_available() check. It should rather be set before the
rseq_available() check.
Set the rseq_size to 0 (error value) immediately after the
rseq_available() check fails rather than in the thread registration
functions.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221122203932.231377-2-mathieu.desnoyers@efficios.com
Diffstat (limited to 'fs/binfmt_elf.c')
0 files changed, 0 insertions, 0 deletions