Re: [PATCH 5/5] uprobes: write_opcode: alloc the new page outsideof "retry" loop

From: Oleg Nesterov
Date: Wed Jun 20 2012 - 09:51:41 EST


On 06/20, Anton Arapov wrote:
>
> On Tue, Jun 19, 2012 at 09:47:59PM +0200, Oleg Nesterov wrote:
> > @@ -214,19 +214,18 @@ static int write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
> > struct vm_area_struct *vma;
> > int ret;
> >
> > -retry:
> > - /* Read the page with vaddr into memory */
> > - ret = get_user_pages(NULL, mm, vaddr, 1, 0, 0, &old_page, &vma);
> > - if (ret <= 0)
> > - return ret;
> > -
> > - ret = -ENOMEM;
> > new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vaddr);
> Should we want NULL instead of vma in alloc_page_vma()? Or
> initialize vma with NULL...

OOPS. Thanks Anton, this should be fixed.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/