From: Oleg Nesterov Date: Thu, 23 Jan 2014 23:55:49 +0000 (-0800) Subject: exec:check_unsafe_exec: use while_each_thread() rather than next_thread() X-Git-Tag: v3.14-rc1~108^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83f62a2eacb1d6945c78523f20e0c34b5d94913c;p=pandora-kernel.git exec:check_unsafe_exec: use while_each_thread() rather than next_thread() next_thread() should be avoided, change check_unsafe_exec() to use while_each_thread(). Nobody except signal->curr_target actually needs next_thread-like code, and we need to change (fix) this interface. This particular code is fine, p == current. But in general the code like this can loop forever if p exits and next_thread(t) can't reach the unhashed thread. This also saves 32 bytes. Signed-off-by: Oleg Nesterov Acked-by: KOSAKI Motohiro Cc: Al Viro Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed