diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index da1b838de8a6..5ac3c19c245c 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -395,14 +395,12 @@ retry: | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /* | 397 | /* |
398 | * Search through everything else. We should not get | 398 | * Search through everything else, we should not get here often. |
399 | * here often | ||
400 | */ | 399 | */ |
401 | do_each_thread(g, c) { | 400 | for_each_process_thread(g, c) { |
402 | if (c->mm == mm) | 401 | if (!(c->flags & PF_KTHREAD) && c->mm == mm) |
403 | goto assign_new_owner; | 402 | goto assign_new_owner; |
404 | } while_each_thread(g, c); | 403 | } |
405 | |||
406 | read_unlock(&tasklist_lock); | 404 | read_unlock(&tasklist_lock); |
407 | /* | 405 | /* |
408 | * We found no owner yet mm_users > 1: this implies that we are | 406 | * We found no owner yet mm_users > 1: this implies that we are |