diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |