From: Kees Cook Date: Fri, 18 Mar 2011 16:51:16 +0000 (-0700) Subject: Yama: fix default relationship to check thread group X-Git-Url: http://git.alex.org.uk Yama: fix default relationship to check thread group Yet another case of a thread needing to match against the group leader. BugLink: http://bugs.launchpad.net/bugs/737676 Signed-off-by: Kees Cook Signed-off-by: Andy Whitcroft --- diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index f082a55..7c3591a 100644 --- a/security/yama/yama_lsm.c +++ b/security/yama/yama_lsm.c @@ -174,6 +174,8 @@ static int task_is_descendant(struct task_struct *parent, rcu_read_lock(); read_lock(&tasklist_lock); + if (!thread_group_leader(parent)) + parent = parent->group_leader; while (walker->pid > 0) { if (!thread_group_leader(walker)) walker = walker->group_leader;