Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming...
authorIngo Molnar <mingo@kernel.org>
Wed, 6 May 2015 06:29:37 +0000 (08:29 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 May 2015 06:30:24 +0000 (08:30 +0200)
Pull EFI fixes from Matt Fleming:

 * Avoid garbage names in efivarfs due to buggy firmware by zeroing
   EFI variable name. (Ross Lagerwall)

 * Stop erroneously dropping upper 32 bits of boot command line pointer
   in EFI boot stub and stash them in ext_cmd_line_ptr. (Roy Franz)

 * Fix double-free bug in error handling code path of EFI runtime map
   code. (Dan Carpenter)

Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
arch/x86/boot/compressed/eboot.c

@@@ -13,7 -13,8 +13,7 @@@
  #include <asm/setup.h>
  #include <asm/desc.h>
  
 -#undef memcpy                 /* Use memcpy from misc.c */
 -
 +#include "../string.h"
  #include "eboot.h"
  
  static efi_system_table_t *sys_table;
@@@ -1109,6 -1110,8 +1109,8 @@@ struct boot_params *make_boot_params(st
        if (!cmdline_ptr)
                goto fail;
        hdr->cmd_line_ptr = (unsigned long)cmdline_ptr;
+       /* Fill in upper bits of command line address, NOP on 32 bit  */
+       boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32;
  
        hdr->ramdisk_image = 0;
        hdr->ramdisk_size = 0;