lkml.org 
[lkml]   [2013]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 08/20] vmcore: modify vmcore clean-up function to free buffer on 2nd kernel
Date
If flag MEM_TYPE_CURRENT_KERNEL is set, the object is copied in some
buffer on the 2nd kernel, so clean-up funciton needs to free it.

Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
---

fs/proc/vmcore.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 6b071b4..e4751ce 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -926,6 +926,10 @@ void vmcore_cleanup(void)
struct vmcore *m;

m = list_entry(pos, struct vmcore, list);
+
+ if (m->flag & MEM_TYPE_CURRENT_KERNEL)
+ free_pages((unsigned long)m->buf, get_order(m->size));
+
list_del(&m->list);
kfree(m);
}


\
 
 \ /
  Last update: 2013-03-05 09:21    [W:0.214 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site