From patchwork Fri Mar 18 16:51:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [natty, and, maverick] Yama: fix default relationship to check thread group Date: Fri, 18 Mar 2011 06:51:16 -0000 From: Kees Cook X-Patchwork-Id: 87552 Message-Id: <20110318165116.GH5466@outflux.net> To: kernel-team@lists.ubuntu.com Yet another case of a thread needing to match against the group leader. Signed-off-by: Kees Cook Acked-by: Stefan Bader Acked-by: Brad Figg Acked-by: Brad Figg --- security/yama/yama_lsm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index b05f1dd..c8f3020 100644 --- a/security/yama/yama_lsm.c +++ b/security/yama/yama_lsm.c @@ -173,6 +173,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;