Skip to content

Commit

Permalink
Merge tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/tip

Pull EFI fixes from Borislav Petkov:
 "More EFI fixes forwarded from Ard Biesheuvel:

   - revert efivarfs kmemleak fix again - it was a false positive

   - make CONFIG_EFI_EARLYCON depend on CONFIG_EFI explicitly so it does
     not pull in other dependencies unnecessarily if CONFIG_EFI is not
     set

   - defer attempts to load SSDT overrides from EFI vars until after the
     efivar layer is up"

* tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: EFI_EARLYCON should depend on EFI
  efivarfs: revert "fix memory leak in efivarfs_create()"
  efi/efivars: Set generic ops before loading SSDT
  • Loading branch information
Linus Torvalds committed Nov 29, 2020
2 parents 7255a39 + 36a2375 commit 1214917
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/firmware/efi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER

config EFI_EARLYCON
def_bool y
depends on SERIAL_EARLYCON && !ARM && !IA64
depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
select FONT_SUPPORT
select ARCH_USE_MEMREMAP_PROT

Expand Down
2 changes: 1 addition & 1 deletion drivers/firmware/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ static int __init efisubsys_init(void)

if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
efivar_ssdt_load();
error = generic_ops_register();
if (error)
goto err_put;
efivar_ssdt_load();
platform_device_register_simple("efivars", 0, NULL, 0);
}

Expand Down
2 changes: 2 additions & 0 deletions fs/efivarfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/efi.h>
#include <linux/fs.h>
#include <linux/ctype.h>
#include <linux/kmemleak.h>
#include <linux/slab.h>
#include <linux/uuid.h>

Expand Down Expand Up @@ -103,6 +104,7 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry,
var->var.VariableName[i] = '\0';

inode->i_private = var;
kmemleak_ignore(var);

err = efivar_entry_add(var, &efivarfs_list);
if (err)
Expand Down
1 change: 0 additions & 1 deletion fs/efivarfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ LIST_HEAD(efivarfs_list);
static void efivarfs_evict_inode(struct inode *inode)
{
clear_inode(inode);
kfree(inode->i_private);
}

static const struct super_operations efivarfs_ops = {
Expand Down

0 comments on commit 1214917

Please sign in to comment.