From: Linn Crosetto <linn@hp.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: matt.fleming@intel.com, hpa@zytor.com, tglx@linutronix.de,
mingo@redhat.com, x86@kernel.org, yinghai@kernel.org,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3] x86: EFI stub support for large memory maps
Date: Fri, 27 Sep 2013 17:46:07 -0600 [thread overview]
Message-ID: <20130927234607.GA17867@oranje.fc.hp.com> (raw)
In-Reply-To: <20130926113400.GM21381@console-pimps.org>
On Thu, Sep 26, 2013 at 12:34:00PM +0100, Matt Fleming wrote:
> > I might add the following to your merge for semantic reasons:
> >
> > diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> > index 04b228d..a7677ba 100644
> > --- a/arch/x86/boot/compressed/eboot.c
> > +++ b/arch/x86/boot/compressed/eboot.c
> > @@ -730,6 +730,8 @@ get_map:
> > boot_params->alt_mem_k = 32 * 1024;
> >
> > status = setup_e820(boot_params, e820ext, e820ext_size);
> > + if (status != EFI_SUCCESS)
> > + return status;
> >
> > return EFI_SUCCESS;
>
> Aha, nice catch! Though if setup_e820() fails we should be jumping to
> the 'free_mem_map' label so we don't leak the memory map, like so,
>
> diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> index 04b228d..602950b 100644
> --- a/arch/x86/boot/compressed/eboot.c
> +++ b/arch/x86/boot/compressed/eboot.c
> @@ -730,8 +730,8 @@ get_map:
> boot_params->alt_mem_k = 32 * 1024;
>
> status = setup_e820(boot_params, e820ext, e820ext_size);
> -
> - return EFI_SUCCESS;
> + if (status == EFI_SUCCESS)
> + return status;
>
> free_mem_map:
> efi_call_phys1(sys_table->boottime->free_pool, mem_map);
Given that we have already successfully called exit_boot_services, can we still
make this call to free_pool?
next prev parent reply other threads:[~2013-09-27 23:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 21:02 [PATCH] " Linn Crosetto
2013-09-06 10:03 ` Matt Fleming
2013-09-06 17:04 ` [PATCHv2] " Linn Crosetto
2013-09-17 20:14 ` Matt Fleming
2013-09-23 0:23 ` Linn Crosetto
2013-09-23 1:59 ` [PATCHv3] " Linn Crosetto
2013-09-25 12:58 ` Matt Fleming
2013-09-25 22:45 ` Linn Crosetto
2013-09-26 11:34 ` Matt Fleming
2013-09-27 23:46 ` Linn Crosetto [this message]
2013-09-30 9:22 ` Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130927234607.GA17867@oranje.fc.hp.com \
--to=linn@hp.com \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=matt@console-pimps.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome