Messages in this thread |  | | Date | Mon, 7 Jan 2013 10:16:09 +0100 | From | Anton Arapov <> | Subject | Re: [PATCH 1/7] uprobes: Move alloc_page() from xol_add_vma() to xol_alloc_area() |
| |
On Mon, Dec 31, 2012 at 06:52:12PM +0100, Oleg Nesterov wrote: > Move alloc_page() from xol_add_vma() to xol_alloc_area() to cleanup > the code. This separates the memory allocations and consolidates the > -EALREADY cleanups and the error handling. > > Signed-off-by: Oleg Nesterov <oleg@redhat.com> > --- > kernel/events/uprobes.c | 32 +++++++++++++------------------- > 1 files changed, 13 insertions(+), 19 deletions(-) > > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index f883813..1456f7d 100644 > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -1104,21 +1093,26 @@ static struct xol_area *xol_alloc_area(void) > > area = kzalloc(sizeof(*area), GFP_KERNEL); > if (unlikely(!area)) > - return NULL; > + goto out; > > area->bitmap = kzalloc(BITS_TO_LONGS(UINSNS_PER_PAGE) * sizeof(long), GFP_KERNEL); > - > if (!area->bitmap) > - goto fail; > + goto free_area; > + > + area->page = area->page = alloc_page(GFP_HIGHUSER);
fyi: didn't review this patch set yet, just caught the string above. ;)
Anton.
|  |