lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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.


    \
     
     \ /
      Last update: 2013-01-07 11:01    [W:2.635 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site