From 4c35ded0c9355e978480cdd42ee624ae01754f08 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Fri, 25 Jul 2008 01:47:39 -0700 Subject: [PATCH] --- yaml --- r: 105934 b: refs/heads/master c: 15b9f360c0316c06d37c09b02d85565edbaf9dd3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/exec.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 745689e2a6bc..be7781806ffe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 246bb0b1deb29726990620d8b5e55ca29f331362 +refs/heads/master: 15b9f360c0316c06d37c09b02d85565edbaf9dd3 diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index cd2e8c9b1249..e347e6ed1617 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1574,11 +1574,12 @@ static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm, for_each_process(g) { if (g == tsk->group_leader) continue; - + if (g->flags & PF_KTHREAD) + continue; p = g; do { if (p->mm) { - if (p->mm == mm) { + if (unlikely(p->mm == mm)) { lock_task_sighand(p, &flags); zap_process(p); unlock_task_sighand(p, &flags);