aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index cd2e8c9b1249..e347e6ed1617 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1574,11 +1574,12 @@ static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
1574 for_each_process(g) { 1574 for_each_process(g) {
1575 if (g == tsk->group_leader) 1575 if (g == tsk->group_leader)
1576 continue; 1576 continue;
1577 1577 if (g->flags & PF_KTHREAD)
1578 continue;
1578 p = g; 1579 p = g;
1579 do { 1580 do {
1580 if (p->mm) { 1581 if (p->mm) {
1581 if (p->mm == mm) { 1582 if (unlikely(p->mm == mm)) {
1582 lock_task_sighand(p, &flags); 1583 lock_task_sighand(p, &flags);
1583 zap_process(p); 1584 zap_process(p);
1584 unlock_task_sighand(p, &flags); 1585 unlock_task_sighand(p, &flags);