lkml.org 
[lkml]   [2013]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/13] vmcore: modify vmcore clean-up function to free buffer on 2nd kernel
On Thu, Feb 14, 2013 at 07:12:16PM +0900, HATAYAMA Daisuke wrote:
> Vmcore object has buffer on 2nd kernel if it has VMCORE_2ND_KERNEL
> type, which needs to be freed.
>
> Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> ---
>
> fs/proc/vmcore.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
> index 7e3f922..77e0a0e 100644
> --- a/fs/proc/vmcore.c
> +++ b/fs/proc/vmcore.c
> @@ -735,6 +735,15 @@ void vmcore_cleanup(void)
> struct vmcore *m;
>
> m = list_entry(pos, struct vmcore, list);
> +
> + switch (m->type) {
> + case VMCORE_OLD_MEMORY:
> + break;
> + case VMCORE_2ND_KERNEL:
> + free_pages((unsigned long)m->buf, get_order(m->size));
> + break;

I think order of patches is little wrong. None of the patches so far has
done any memory allocation for VMCORE_2ND_KERNEL, and we are already
freeing the memory which will be allocated in future patches. May be just
merge this patch with the patch which does memory allocation. No need
to separate it out.

Thanks
Vivek


\
 
 \ /
  Last update: 2013-02-15 17:01    [W:0.171 / U:1.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site