summaryrefslogtreecommitdiffstats
path: root/fs/nls
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-02-08 04:19:18 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:28 -0800
commitd36174bc2bce0372693a9cfbdef8b2689c9982cb (patch)
treecdb327c68844f105a8ac8b732e862f24edc35f24 /fs/nls
parentf374ada53bd1ca7c16d7607369fccc6769704956 (diff)
downloadlinux-d36174bc2bce0372693a9cfbdef8b2689c9982cb.tar.bz2
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 <oleg@tv-sign.ru> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nls')
0 files changed, 0 insertions, 0 deletions