Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1503062
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 8/8] efi: efivar_ssdt_load: Don't return success on allocation failure |
| Date | 2016-10-18 16:40 +0200 |
| Message-ID | <stDIE-2X6-105@gated-at.bofh.it> (permalink) |
| References | <stDIC-2X6-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Dan Carpenter <dan.carpenter@oracle.com>
We should return -ENOMEM here, instead of success.
Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
drivers/firmware/efi/efi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1ac199cd75e7..a4944e22f294 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -259,8 +259,10 @@ static __init int efivar_ssdt_load(void)
}
data = kmalloc(size, GFP_KERNEL);
- if (!data)
+ if (!data) {
+ ret = -ENOMEM;
goto free_entry;
+ }
ret = efivar_entry_get(entry, NULL, &size, data);
if (ret) {
--
2.10.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 0/8] EFI changes for v4.10 Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[PATCH 1/8] MAINTAINERS: add myself as EFI maintainer Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] MAINTAINERS: Add myself as EFI maintainer tip-bot for Ard Biesheuvel <tipbot@zytor.com> - 2016-10-18 17:40 +0200
[PATCH 3/8] efi/arm*: efi_init() error handling fix Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] efi/arm*: Fix efi_init() error handling tip-bot for Yisheng Xie <tipbot@zytor.com> - 2016-10-18 17:40 +0200
[PATCH 2/8] efi: Remove unused including <linux/version.h> Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] efi: Remove unused include of <linux/version.h> tip-bot for Wei Yongjun <tipbot@zytor.com> - 2016-10-18 17:40 +0200
[PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] efi/efi_test: Fix uninitialized variable 'datasize' tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
[PATCH 5/8] efi/efi_test: Fix the uninitialized value rv Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] efi/efi_test: Fix uninitialized variable 'rv' tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
[PATCH 6/8] efi/efi_test: Use memdup_user() as a cleanup Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] efi/efi_test: Use memdup_user() as a cleanup tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
[PATCH 8/8] efi: efivar_ssdt_load: Don't return success on allocation failure Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
[tip:efi/core] efi/efivar_ssdt_load: Don't return success on allocation failure tip-bot for Dan Carpenter <tipbot@zytor.com> - 2016-10-18 17:40 +0200
Re: [GIT PULL 0/8] EFI changes for v4.10 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-10-18 17:30 +0200
Re: [GIT PULL 0/8] EFI changes for v4.10 Ingo Molnar <mingo@kernel.org> - 2016-10-18 17:30 +0200
Re: [GIT PULL 0/8] EFI changes for v4.10 Lukas Wunner <lukas@wunner.de> - 2016-10-18 17:40 +0200
Re: [GIT PULL 0/8] EFI changes for v4.10 Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 17:50 +0200
csiph-web