Skip to content

Commit 1214917

Browse files
committed
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
2 parents 7255a39 + 36a2375 commit 1214917

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

drivers/firmware/efi/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
270270

271271
config EFI_EARLYCON
272272
def_bool y
273-
depends on SERIAL_EARLYCON && !ARM && !IA64
273+
depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
274274
select FONT_SUPPORT
275275
select ARCH_USE_MEMREMAP_PROT
276276

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,10 @@ static int __init efisubsys_init(void)
390390

391391
if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
392392
EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
393-
efivar_ssdt_load();
394393
error = generic_ops_register();
395394
if (error)
396395
goto err_put;
396+
efivar_ssdt_load();
397397
platform_device_register_simple("efivars", 0, NULL, 0);
398398
}
399399

fs/efivarfs/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/efi.h>
88
#include <linux/fs.h>
99
#include <linux/ctype.h>
10+
#include <linux/kmemleak.h>
1011
#include <linux/slab.h>
1112
#include <linux/uuid.h>
1213

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

105106
inode->i_private = var;
107+
kmemleak_ignore(var);
106108

107109
err = efivar_entry_add(var, &efivarfs_list);
108110
if (err)

fs/efivarfs/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ LIST_HEAD(efivarfs_list);
2121
static void efivarfs_evict_inode(struct inode *inode)
2222
{
2323
clear_inode(inode);
24-
kfree(inode->i_private);
2524
}
2625

2726
static const struct super_operations efivarfs_ops = {

0 commit comments

Comments
 (0)