Commit 1214917e authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/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
parents 7255a39d 36a23752
...@@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER ...@@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
config EFI_EARLYCON config EFI_EARLYCON
def_bool y def_bool y
depends on SERIAL_EARLYCON && !ARM && !IA64 depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
select FONT_SUPPORT select FONT_SUPPORT
select ARCH_USE_MEMREMAP_PROT select ARCH_USE_MEMREMAP_PROT
......
...@@ -390,10 +390,10 @@ static int __init efisubsys_init(void) ...@@ -390,10 +390,10 @@ static int __init efisubsys_init(void)
if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE | if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) { EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
efivar_ssdt_load();
error = generic_ops_register(); error = generic_ops_register();
if (error) if (error)
goto err_put; goto err_put;
efivar_ssdt_load();
platform_device_register_simple("efivars", 0, NULL, 0); platform_device_register_simple("efivars", 0, NULL, 0);
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/kmemleak.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/uuid.h> #include <linux/uuid.h>
...@@ -103,6 +104,7 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry, ...@@ -103,6 +104,7 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry,
var->var.VariableName[i] = '\0'; var->var.VariableName[i] = '\0';
inode->i_private = var; inode->i_private = var;
kmemleak_ignore(var);
err = efivar_entry_add(var, &efivarfs_list); err = efivar_entry_add(var, &efivarfs_list);
if (err) if (err)
......
...@@ -21,7 +21,6 @@ LIST_HEAD(efivarfs_list); ...@@ -21,7 +21,6 @@ LIST_HEAD(efivarfs_list);
static void efivarfs_evict_inode(struct inode *inode) static void efivarfs_evict_inode(struct inode *inode)
{ {
clear_inode(inode); clear_inode(inode);
kfree(inode->i_private);
} }
static const struct super_operations efivarfs_ops = { static const struct super_operations efivarfs_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment