All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] x86/bootm: fix error handling in boot_prep_linux(...)
@ 2018-10-11  5:44 Hannes Schmelzer
  2018-10-11  5:58 ` Bin Meng
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Schmelzer @ 2018-10-11  5:44 UTC (permalink / raw)
  To: u-boot

Once we get a zero pointer from load_zimage(...) we must bunch out
instead of continue boot.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
---

 arch/x86/lib/bootm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 54c22fe..832b1f9 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -116,6 +116,10 @@ static int boot_prep_linux(bootm_headers_t *images)
 		char *base_ptr;
 
 		base_ptr = (char *)load_zimage(data, len, &load_address);
+		if (!base_ptr) {
+			puts("## Kernel loading failed ...\n");
+			goto error;
+		}
 		images->os.load = load_address;
 		cmd_line_dest = base_ptr + COMMAND_LINE_OFFSET;
 		images->ep = (ulong)base_ptr;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] x86/bootm: fix error handling in boot_prep_linux(...)
  2018-10-11  5:44 [U-Boot] [PATCH] x86/bootm: fix error handling in boot_prep_linux(...) Hannes Schmelzer
@ 2018-10-11  5:58 ` Bin Meng
  2018-10-22  9:50   ` Bin Meng
  0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2018-10-11  5:58 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 11, 2018 at 1:44 PM Hannes Schmelzer
<hannes.schmelzer@br-automation.com> wrote:
>
> Once we get a zero pointer from load_zimage(...) we must bunch out
> instead of continue boot.
>
> Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
> ---
>
>  arch/x86/lib/bootm.c | 4 ++++
>  1 file changed, 4 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] x86/bootm: fix error handling in boot_prep_linux(...)
  2018-10-11  5:58 ` Bin Meng
@ 2018-10-22  9:50   ` Bin Meng
  0 siblings, 0 replies; 3+ messages in thread
From: Bin Meng @ 2018-10-22  9:50 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 11, 2018 at 1:58 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Thu, Oct 11, 2018 at 1:44 PM Hannes Schmelzer
> <hannes.schmelzer@br-automation.com> wrote:
> >
> > Once we get a zero pointer from load_zimage(...) we must bunch out
> > instead of continue boot.
> >
> > Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
> > ---
> >
> >  arch/x86/lib/bootm.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-22  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11  5:44 [U-Boot] [PATCH] x86/bootm: fix error handling in boot_prep_linux(...) Hannes Schmelzer
2018-10-11  5:58 ` Bin Meng
2018-10-22  9:50   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.