Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1181416

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

From Michael Holzheu <holzheu@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start
Date 2015-07-10 11:30 +0200
Message-ID <pKCN4-47C-5@gated-at.bofh.it> (permalink)
References <pKyT8-1F9-11@gated-at.bofh.it> <pKCk2-3Ii-27@gated-at.bofh.it> <pKCtI-417-9@gated-at.bofh.it> <pKCDo-44s-11@gated-at.bofh.it>
Organization IBM

Show all headers | View raw


On Fri, 10 Jul 2015 11:14:06 +0200
Michael Holzheu <holzheu@linux.vnet.ibm.com> wrote:

> On Fri, 10 Jul 2015 17:03:22 +0800
> Minfei Huang <mnfhuang@gmail.com> 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/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages  when kdump fails to start Michael Holzheu <holzheu@linux.vnet.ibm.com> - 2015-07-10 11:00 +0200
  Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages  when kdump fails to start Minfei Huang <mnfhuang@gmail.com> - 2015-07-10 11:10 +0200
    Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages  when kdump fails to start Michael Holzheu <holzheu@linux.vnet.ibm.com> - 2015-07-10 11:20 +0200
      Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages  when kdump fails to start Michael Holzheu <holzheu@linux.vnet.ibm.com> - 2015-07-10 11:30 +0200

csiph-web