[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <173744424077.31546.6902932742981910502.tip-bot2@tip-bot2>
Date: Tue, 21 Jan 2025 07:24:00 -0000
From: "tip-bot2 for Mathieu Desnoyers" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Ingo Molnar <mingo@...nel.org>, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: sched/core] rseq: Fix rseq unregistration regression
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 40724ecafccb1fb62b66264854e8c3ad394c8f3d
Gitweb: https://git.kernel.org/tip/40724ecafccb1fb62b66264854e8c3ad394c8f3d
Author: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
AuthorDate: Thu, 16 Jan 2025 15:59:56 -05:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 21 Jan 2025 08:10:51 +01:00
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: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Link: https://lore.kernel.org/r/20250116205956.836074-1-mathieu.desnoyers@efficios.com
---
kernel/rseq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rseq.c b/kernel/rseq.c
index e04bb30..442aba2 100644
--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -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).
Powered by blists - more mailing lists