From: Oleg Nesterov Date: Fri, 8 Feb 2008 12:19:18 +0000 (-0800) Subject: uglify kill_pid_info() to fix kill() vs exec() race X-Git-Tag: v2.6.25-rc1~208 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d36174bc2bce0372693a9cfbdef8b2689c9982cb;p=pandora-kernel.git 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 Cc: "Eric W. Biederman" Cc: Davide Libenzi Cc: Pavel Emelyanov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed