rseq: Avoid CPU/MM CID updates when no event pending

There is no need to update these values unconditionally if there is no
event pending.

Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Mathieu Desnoyers <[email protected]>
Link: https://patch.msgid.link/[email protected]
This commit is contained in:
Thomas Gleixner authored and Ingo Molnar committed 2025-11-04 08:30:43 +01:00
1 parent 83409986f4
commit 566d8015f7
1 file changed
+6 -5
+6 -5
View File
@@ -464,11 +464,12 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs)
t->rseq_event_pending = false;
}
if (IS_ENABLED(CONFIG_DEBUG_RSEQ) || event) {
ret = rseq_ip_fixup(regs, event);
if (unlikely(ret < 0))
goto error;
}
if (!IS_ENABLED(CONFIG_DEBUG_RSEQ) && !event)
return;
ret = rseq_ip_fixup(regs, event);
if (unlikely(ret < 0))
goto error;
if (unlikely(rseq_update_cpu_node_id(t)))
goto error;