diff options
| author | Oleg Nesterov <[email protected]> | 2008-02-08 04:19:18 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-02-08 09:22:28 -0800 |
| commit | d36174bc2bce0372693a9cfbdef8b2689c9982cb (patch) | |
| tree | cdb327c68844f105a8ac8b732e862f24edc35f24 /include/linux | |
| parent | f374ada53bd1ca7c16d7607369fccc6769704956 (diff) | |
uglify kill_pid_info() to fix kill() vs exec() race
kill_pid_info()->pid_task() could be the old leader of the execing process.
In that case it is possible that the leader will be released before we take
siglock. This means that kill_pid_info() (and thus sys_kill()) can return a
false -ESRCH.
Change the code to retry when lock_task_sighand() fails. The endless loop is
not possible, __exit_signal() both clears ->sighand and does detach_pid().
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Davide Libenzi <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Roland McGrath <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions