stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "efi/efivar_ssdt_load: Don't return success on allocation failure" has been added to the 4.9-stable tree
@ 2017-01-09 12:07 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-09 12:07 UTC (permalink / raw)
  To: dan.carpenter, ard.biesheuvel, gregkh, mingo, peterz, tglx,
	torvalds
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    efi/efivar_ssdt_load: Don't return success on allocation failure

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     efi-efivar_ssdt_load-don-t-return-success-on-allocation-failure.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From a75dcb5848359f488c32c0aef8711d9bd37a77b8 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 18 Oct 2016 15:33:18 +0100
Subject: efi/efivar_ssdt_load: Don't return success on allocation failure

From: Dan Carpenter <dan.carpenter@oracle.com>

commit a75dcb5848359f488c32c0aef8711d9bd37a77b8 upstream.

We should return -ENOMEM here, instead of success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Link: http://lkml.kernel.org/r/20161018143318.15673-9-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/firmware/efi/efi.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- 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) {


Patches currently in stable-queue which might be from dan.carpenter@oracle.com are

queue-4.9/usb-xhci-mem-use-passed-in-gfp-flags-instead-of-gfp_kernel.patch
queue-4.9/efi-efivar_ssdt_load-don-t-return-success-on-allocation-failure.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-09 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 12:07 Patch "efi/efivar_ssdt_load: Don't return success on allocation failure" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).