From: Oleg Nesterov Date: Wed, 10 Dec 2014 23:45:18 +0000 (-0800) Subject: proc: task_state: ptrace_parent() doesn't need pid_alive() check X-Git-Tag: omap-for-v3.19/fixes-rc1~142^2~102 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abdba6e9ea6d3903c2b0618db720e17b3c1c705c;p=pandora-kernel.git proc: task_state: ptrace_parent() doesn't need pid_alive() check p->ptrace != 0 means that release_task(p) was not called, so pid_alive() buys nothing and we can remove this check. Other callers already use it directly without additional checks. Note: with or without this patch ptrace_parent() can return the pointer to the freed task, this will be explained/fixed later. Signed-off-by: Oleg Nesterov Cc: Aaron Tomlin Cc: Alexey Dobriyan Cc: "Eric W. Biederman" , Cc: Sterling Alexander Cc: Peter Zijlstra Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed