There is no need to update these values unconditionally if there is no event pending.
Unified · Split
| @@ -464,11 +464,12 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) · 463 unmodified lines | ||
| 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; |