lkml.org 
[lkml]   [2020]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH 08/15] efi/x86: Move command-line initrd loading to efi_main
On Wed, May 27, 2020 at 10:30:18PM +0000, Williams, Dan J wrote:
> On Fri, 2020-05-08 at 20:01 +0200, Ard Biesheuvel wrote:
> > From: Arvind Sankar <nivedita@alum.mit.edu>
> >
> > Consolidate the initrd loading in efi_main.
> >
> > The command line options now need to be parsed only once.
> >
> > Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
> > Link:
> > https://lore.kernel.org/r/20200430182843.2510180-9-nivedita@alum.mit.edu
> > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
>
> Hi,
>
> This patch patch in tip/master as:
>
> 987053a30016 efi/x86: Move command-line initrd loading to efi_main
>
> ...regresses my nfs root configuration. It hangs trying to mount the
> nfs root filesystem "root=/dev/nfs ip=dhcp".
>
> It does not revert cleanly.
>
>

Does this fix it?

diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index defeb6035109..f53362efef84 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -771,10 +771,12 @@ unsigned long efi_main(efi_handle_t handle,
efi_err("Failed to load initrd!\n");
goto fail;
}
- efi_set_u64_split(addr, &hdr->ramdisk_image,
- &boot_params->ext_ramdisk_image);
- efi_set_u64_split(size, &hdr->ramdisk_size,
- &boot_params->ext_ramdisk_size);
+ if (size > 0) {
+ efi_set_u64_split(addr, &hdr->ramdisk_image,
+ &boot_params->ext_ramdisk_image);
+ efi_set_u64_split(size, &hdr->ramdisk_size,
+ &boot_params->ext_ramdisk_size);
+ }
}

/*
\
 
 \ /
  Last update: 2020-05-28 00:48    [W:0.067 / U:6.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site