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

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 ebied...@xmission.com Cc:

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

2013-02-23 Thread Yanfei Zhang
2013/2/23 Andrew Morton a...@linux-foundation.org: On Fri, 22 Feb 2013 12:36:13 +0800 Zhang Yanfei zhangyan...@cn.fujitsu.com 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

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 > +++

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 zhangyan...@cn.fujitsu.com 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

[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 |

[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 ebied...@xmission.com Cc: Andrew Morton a...@linux-foundation.org Cc: Sasha Levin