]> Git Repo - linux.git/commitdiff
rseq: Fix rseq unregistration regression
authorMathieu Desnoyers <[email protected]>
Thu, 16 Jan 2025 20:59:56 +0000 (15:59 -0500)
committerIngo Molnar <[email protected]>
Tue, 21 Jan 2025 07:10:51 +0000 (08:10 +0100)
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: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config")
Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
kernel/rseq.c

index e04bb30a2eb8fa02ba64a04efd8d10ca8396930f..442aba29bc4cf094405e1b267a868b2b495cc5f6 100644 (file)
@@ -201,7 +201,7 @@ static int rseq_reset_rseq_cpu_node_id(struct task_struct *t)
        /*
         * Validate read-only rseq fields.
         */
-       if (!rseq_validate_ro_fields(t))
+       if (rseq_validate_ro_fields(t))
                return -EFAULT;
        /*
         * Reset cpu_id_start to its initial state (0).
This page took 0.055101 seconds and 4 git commands to generate.