Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932078AbbGJJ32 (ORCPT ); Fri, 10 Jul 2015 05:29:28 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:45543 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753451AbbGJJ3T (ORCPT ); Fri, 10 Jul 2015 05:29:19 -0400 X-Helo: d06dlp02.portsmouth.uk.ibm.com X-MailFrom: holzheu@linux.vnet.ibm.com X-RcptTo: linux-s390@vger.kernel.org Date: Fri, 10 Jul 2015 11:29:13 +0200 From: Michael Holzheu To: Michael Holzheu Cc: Minfei Huang , ebiederm@xmission.com, vgoyal@redhat.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, linux390@de.ibm.com, linux-s390@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start Message-ID: <20150710112913.3d6853cb@holzheu> In-Reply-To: <20150710111406.279dba14@holzheu> References: <1436505137-4364-1-git-send-email-mnfhuang@gmail.com> <20150710105413.04e1db00@holzheu> <20150710090322.GA5138@dhcp-128-21.nay.redhat.com> <20150710111406.279dba14@holzheu> Organization: IBM X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15071009-0013-0000-0000-000004A58497 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 966 Lines: 37 On Fri, 10 Jul 2015 11:14:06 +0200 Michael Holzheu wrote: > On Fri, 10 Jul 2015 17:03:22 +0800 > Minfei Huang wrote: [snip] > +static int __kexec_load(unsigned long entry, unsigned long nr_segments, > + struct kexec_segment __user *segments, > + unsigned long flags) > +{ > + struct kimage **dest_image, *image; > + unsigned long i; > + int result; > + > + if (flags & KEXEC_ON_CRASH) > + dest_image = &kexec_crash_image; > + else > + dest_image = &kexec_image; > + > + if (nr_segments == 0) { > + /* Uninstall image */ > + kfree(xchg(dest_image, NULL)); Sorry, too fast today... Should be of course not kfree, but: kimage_free(dest_image, NULL)); Michael -- 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/