[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-093174f52553532b9eb0e63cbbb254f6990d46d5@git.kernel.org>
Date: Sun, 22 Jul 2018 08:21:41 -0700
From: tip-bot for Ard Biesheuvel <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: lukas@...ner.de, tglx@...utronix.de, mingo@...nel.org,
andriy.shevchenko@...ux.intel.com, linux-kernel@...r.kernel.org,
hpa@...or.com, ard.biesheuvel@...aro.org, hdegoede@...hat.com,
torvalds@...ux-foundation.org, peterz@...radead.org
Subject: [tip:efi/core] efi/x86: Add missing NULL initialization in UGA draw
protocol discovery
Commit-ID: 093174f52553532b9eb0e63cbbb254f6990d46d5
Gitweb: https://git.kernel.org/tip/093174f52553532b9eb0e63cbbb254f6990d46d5
Author: Ard Biesheuvel <ard.biesheuvel@...aro.org>
AuthorDate: Fri, 20 Jul 2018 10:47:22 +0900
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 22 Jul 2018 14:13:43 +0200
efi/x86: Add missing NULL initialization in UGA draw protocol discovery
The UGA draw protocol discovery routine looks for a EFI handle that has
both the UGA draw protocol and the PCI I/O protocol installed. It checks
for the latter by calling handle_protocol() and pass it a PCI I/O
protocol pointer variable by reference, but fails to initialize it to
NULL, which means the non-NULL check later on in the code could produce
false positives, given that the return code of the handle_protocol() call
is ignored entirely. So add the missing initialization.
Tested-by: Hans de Goede <hdegoede@...hat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Lukas Wunner <lukas@...ner.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Link: http://lkml.kernel.org/r/20180720014726.24031-6-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/boot/compressed/eboot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index ac8e442db71f..92b573fd239c 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -359,6 +359,7 @@ setup_uga(struct screen_info *si, efi_guid_t *uga_proto, unsigned long size)
if (status != EFI_SUCCESS)
continue;
+ pciio = NULL;
efi_call_early(handle_protocol, handle, &pciio_proto, &pciio);
status = efi_call_proto(efi_uga_draw_protocol, get_mode, uga,
Powered by blists - more mailing lists