aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index fb5f11134..9146bbe17 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -411,14 +411,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