mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 08:45:26 -05:00
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 <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://patch.msgid.link/20251027084306.462964916@linutronix.de
This commit is contained in:
committed by
Ingo Molnar
parent
83409986f4
commit
566d8015f7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user