| Line 101: |
Line 101: |
| | The logic responsible for this is implemented in the <code>fixup_thread_rseq</code> function: | | The logic responsible for this is implemented in the <code>fixup_thread_rseq</code> function: |
| | <pre> | | <pre> |
| − | if (task_in_rseq(rseq_cs, TI_IP(core))) {
| + | if (task_in_rseq(rseq_cs, TI_IP(core))) { |
| − | struct pid *tid = &item->threads[i];
| + | struct pid *tid = &item->threads[i]; |
| | | | |
| | ... | | ... |
| | | | |
| − | pr_warn("The %d task is in rseq critical section. IP will be set to rseq abort handler addr\n",
| + | pr_warn("The %d task is in rseq critical section. IP will be set to rseq abort handler addr\n", |
| − | tid->real);
| + | tid->real); |
| | | | |
| | ... | | ... |
| | | | |
| − | if (!(rseq_cs->flags & RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL)) {
| + | if (!(rseq_cs->flags & RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL)) { |
| − | pr_warn("The %d task is in rseq critical section. IP will be set to rseq abort handler addr\n",
| + | pr_warn("The %d task is in rseq critical section. IP will be set to rseq abort handler addr\n", |
| − | tid->real);
| + | tid->real); |
| | | | |
| − | TI_IP(core) = rseq_cs->abort_ip;
| + | TI_IP(core) = rseq_cs->abort_ip; |
| | | | |
| − | if (item->pid->real == tid->real) {
| + | if (item->pid->real == tid->real) { |
| − | compel_set_leader_ip(dmpi(item)->parasite_ctl, rseq_cs->abort_ip);
| + | compel_set_leader_ip(dmpi(item)->parasite_ctl, rseq_cs->abort_ip); |
| − | } else {
| + | } else { |
| − | compel_set_thread_ip(dmpi(item)->thread_ctls[i], rseq_cs->abort_ip);
| + | compel_set_thread_ip(dmpi(item)->thread_ctls[i], rseq_cs->abort_ip); |
| − | }
| |
| | } | | } |
| | } | | } |
| | + | } |
| | </pre> | | </pre> |
| | | | |