Skip to content

Commit 40724ec

Browse files
compudjIngo Molnar
authored andcommitted
rseq: Fix rseq unregistration regression
A logic inversion in rseq_reset_rseq_cpu_node_id() causes the rseq unregistration to fail when rseq_validate_ro_fields() succeeds rather than the opposite. This affects both CONFIG_DEBUG_RSEQ=y and CONFIG_DEBUG_RSEQ=n. Fixes: 7d5265f ("rseq: Validate read-only fields under DEBUG_RSEQ config") Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20250116205956.836074-1-mathieu.desnoyers@efficios.com
1 parent 7d9da04 commit 40724ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static int rseq_reset_rseq_cpu_node_id(struct task_struct *t)
201201
/*
202202
* Validate read-only rseq fields.
203203
*/
204-
if (!rseq_validate_ro_fields(t))
204+
if (rseq_validate_ro_fields(t))
205205
return -EFAULT;
206206
/*
207207
* Reset cpu_id_start to its initial state (0).

0 commit comments

Comments
 (0)