mm/hwpoison: fix page refcount of unknown non LRU page
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / mm / util.c
index ab1424dbe2e6c9396ee66ab4446f1bc1cd557382..0b1725254ff108f3421c655a96204876121c803d 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -272,17 +272,14 @@ pid_t vm_is_stack(struct task_struct *task,
 
        if (in_group) {
                struct task_struct *t;
-               rcu_read_lock();
-               if (!pid_alive(task))
-                       goto done;
 
-               t = task;
-               do {
+               rcu_read_lock();
+               for_each_thread(task, t) {
                        if (vm_is_stack_for_task(t, vma)) {
                                ret = t->pid;
                                goto done;
                        }
-               } while_each_thread(task, t);
+               }
 done:
                rcu_read_unlock();
        }