[PATCH 06/13] vmcore: modify vmcore clean-up function to free buffer on 2nd kernel
HATAYAMA Daisuke
d.hatayama at jp.fujitsu.com
Thu Feb 14 05:12:16 EST 2013
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 at 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;
+ }
+
list_del(&m->list);
kfree(m);
}
More information about the kexec
mailing list