From 919fbae5dc2d5d8c2ac78d79bb80adff8a1f61cb Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Fri, 28 Sep 2012 10:19:12 +1000 Subject: [PATCH] mempolicy-fix-a-memory-corruption-by-refcount-imbalance-in-alloc_pages_vma-v2 Signed-off-by: KOSAKI Motohiro Signed-off-by: Mel Gorman Reviewed-by: Christoph Lameter Cc: Josh Boyer Signed-off-by: Andrew Morton --- mm/mempolicy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 3c23d89fe06d..10ad3b36d035 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1588,16 +1588,13 @@ struct mempolicy *get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned long addr) { struct mempolicy *pol = task->mempolicy; - int got_ref; if (vma) { if (vma->vm_ops && vma->vm_ops->get_policy) { struct mempolicy *vpol = vma->vm_ops->get_policy(vma, addr); - if (vpol) { + if (vpol) pol = vpol; - got_ref = 1; - } } else if (vma->vm_policy) { pol = vma->vm_policy; -- 2.39.5