Message ID | 1532442832-19106-2-git-send-email-paolo.pisati@canonical.com |
---|---|
State | New |
Headers | show |
Series | mm/mempolicy: fix use after free when calling get_mempolicy | expand |
Clean cherry-pick.
Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index c5802e4..f8e170e 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -986,11 +986,6 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask, *policy |= (pol->flags & MPOL_MODE_FLAGS); } - if (vma) { - up_read(¤t->mm->mmap_sem); - vma = NULL; - } - err = 0; if (nmask) { if (mpol_store_user_nodemask(pol)) {