Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754720Ab3CEHFn (ORCPT ); Tue, 5 Mar 2013 02:05:43 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:50411 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753805Ab3CEHFk (ORCPT ); Tue, 5 Mar 2013 02:05:40 -0500 From: HATAYAMA Daisuke Subject: [PATCH v2 08/20] vmcore: modify vmcore clean-up function to free buffer on 2nd kernel To: vgoyal@redhat.com, ebiederm@xmission.com, cpw@sgi.com, kumagai-atsushi@mxc.nes.nec.co.jp, lisa.mitchell@hp.com, heiko.carstens@de.ibm.com, akpm@linux-foundation.org Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org Date: Sat, 02 Mar 2013 17:36:33 +0900 Message-ID: <20130302083633.31252.48024.stgit@localhost6.localdomain6> In-Reply-To: <20130302083447.31252.93914.stgit@localhost6.localdomain6> References: <20130302083447.31252.93914.stgit@localhost6.localdomain6> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 912 Lines: 30 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 --- 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); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/