Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Thomas Gleixner and committed by
Ingo Molnar
566d8015 83409986

+6 -5
+6 -5
kernel/rseq.c
··· 464 464 t->rseq_event_pending = false; 465 465 } 466 466 467 - if (IS_ENABLED(CONFIG_DEBUG_RSEQ) || event) { 468 - ret = rseq_ip_fixup(regs, event); 469 - if (unlikely(ret < 0)) 470 - goto error; 471 - } 467 + if (!IS_ENABLED(CONFIG_DEBUG_RSEQ) && !event) 468 + return; 469 + 470 + ret = rseq_ip_fixup(regs, event); 471 + if (unlikely(ret < 0)) 472 + goto error; 472 473 473 474 if (unlikely(rseq_update_cpu_node_id(t))) 474 475 goto error;