[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130107091609.GA24171@bandura.brq.redhat.com>
Date: Mon, 7 Jan 2013 10:16:09 +0100
From: Anton Arapov <anton@...hat.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Frank Eigler <fche@...hat.com>,
Josh Stone <jistone@...hat.com>,
"Suzuki K. Poulose" <suzuki@...ibm.com>,
linux-kernel@...r.kernel.org
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@...hat.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists