Commit 169eae7
rseq: Eliminate useless task_work on execve
Eliminate a useless task_work on execve by moving the call to
rseq_set_notify_resume() from sched_mm_cid_after_execve() to the error
path of bprm_execve().
The call to rseq_set_notify_resume() from sched_mm_cid_after_execve() is
pointless in the success case, because rseq_execve() will clear the rseq
pointer before returning to userspace.
sched_mm_cid_after_execve() is called from both the success and error
paths of bprm_execve(). The call to rseq_set_notify_resume() is needed
on error because the mm_cid may have changed.
Also move the rseq_execve() to right after sched_mm_cid_after_execve()
in bprm_execve().
[ mingo: Merged to a recent upstream kernel, extended the changelog. ]
Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 9757768 commit 169eae7
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
| 1867 | + | |
1867 | 1868 | | |
1868 | 1869 | | |
1869 | | - | |
1870 | 1870 | | |
1871 | 1871 | | |
1872 | 1872 | | |
| |||
1883 | 1883 | | |
1884 | 1884 | | |
1885 | 1885 | | |
| 1886 | + | |
1886 | 1887 | | |
1887 | 1888 | | |
1888 | 1889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10703 | 10703 | | |
10704 | 10704 | | |
10705 | 10705 | | |
10706 | | - | |
10707 | 10706 | | |
10708 | 10707 | | |
10709 | 10708 | | |
| |||
0 commit comments