lkml.org 
[lkml]   [2007]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch](Resend) mm/sparse.c: Improve the error handling for sparse_add_one_section()
From
Date
On Tue, 2007-11-27 at 10:26 +0800, WANG Cong wrote:
>
> @@ -414,7 +418,7 @@ int sparse_add_one_section(struct zone *
> out:
> pgdat_resize_unlock(pgdat, &flags);
> if (ret <= 0)
> - __kfree_section_memmap(memmap, nr_pages);
> + kfree(usemap);
> return ret;
> }
> #endif

Why did you get rid of the memmap free here? A bad return from
sparse_init_one_section() indicates that we didn't use the memmap, so it
will leak otherwise.

-- Dave

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

\
 
 \ /
  Last update: 2007-11-27 19:57    [W:0.247 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site