summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c10
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:
}
/*
- * Search through everything else. We should not get
- * here often
+ * Search through everything else, we should not get here often.
*/
- do_each_thread(g, c) {
- if (c->mm == mm)
+ for_each_process_thread(g, c) {
+ if (!(c->flags & PF_KTHREAD) && c->mm == mm)
goto assign_new_owner;
- } while_each_thread(g, c);
-
+ }
read_unlock(&tasklist_lock);
/*
* We found no owner yet mm_users > 1: this implies that we are
OpenPOWER on IntegriCloud