Re: [PATCH] kexec: fix memory leak in function kimage_normal_alloc

2013-02-23 Thread Yanfei Zhang
2013/2/23 Andrew Morton : > On Fri, 22 Feb 2013 12:36:13 +0800 > Zhang Yanfei wrote: > >> If kimage_normal_alloc() fails to alloc pages for image->swap_page, it >> should call kimage_free_page_list() to free allocated pages in >> image->control_pages list before it frees image. >> >> ... >> >> ---

Re: [PATCH] kexec: fix memory leak in function kimage_normal_alloc

2013-02-23 Thread Simon Horman
On Fri, Feb 22, 2013 at 12:36:13PM +0800, Zhang Yanfei wrote: > If kimage_normal_alloc() fails to alloc pages for image->swap_page, it > should call kimage_free_page_list() to free allocated pages in > image->control_pages list before it frees image. > > Cc: "Eric W. Biederman" > Cc: Andrew Morto

Re: [PATCH] kexec: fix memory leak in function kimage_normal_alloc

2013-02-22 Thread Andrew Morton
On Fri, 22 Feb 2013 12:36:13 +0800 Zhang Yanfei wrote: > If kimage_normal_alloc() fails to alloc pages for image->swap_page, it > should call kimage_free_page_list() to free allocated pages in > image->control_pages list before it frees image. > > ... > > --- a/kernel/kexec.c > +++ b/kernel/kexec

[PATCH] kexec: fix memory leak in function kimage_normal_alloc

2013-02-21 Thread Zhang Yanfei
If kimage_normal_alloc() fails to alloc pages for image->swap_page, it should call kimage_free_page_list() to free allocated pages in image->control_pages list before it frees image. Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Sasha Levin Signed-off-by: Zhang Yanfei --- kernel/kexec.c | 1