History

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.

Thomas Gleixner committed 1 year ago

Commit 566d8011 parent 83409981 file · +6 −5Browse files

Showing the changes to kernel/rseq.c (1 of 1 file). Show all

Unified · Split

kernel/rseq.c+6−5
@@ -464,11 +464,12 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) · 463 unmodified lines
464 t->rseq_event_pending = false;464 t->rseq_event_pending = false;
465 }465 }
466 466
467 if (IS_ENABLED(CONFIG_DEBUG_RSEQ) || event) {467 if (!IS_ENABLED(CONFIG_DEBUG_RSEQ) && !event)
468 ret = rseq_ip_fixup(regs, event);468 return;
469 if (unlikely(ret < 0))469
470 goto error;470 ret = rseq_ip_fixup(regs, event);
471 }471 if (unlikely(ret < 0))
472 goto error;
472 473
473 if (unlikely(rseq_update_cpu_node_id(t)))474 if (unlikely(rseq_update_cpu_node_id(t)))
474 goto error;475 goto error;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t