linux-brain/drivers/firmware
Arvind Sankar 3b631b675b efi/gop: Fix memory leak in __gop_query32/64()
[ Upstream commit ff397be685e410a59c34b21ce0c55d4daa466bb7 ]

efi_graphics_output_protocol::query_mode() returns info in
callee-allocated memory which must be freed by the caller, which
we aren't doing.

We don't actually need to call query_mode() in order to obtain the
info for the current graphics mode, which is already there in
gop->mode->info, so just access it directly in the setup_gop32/64()
functions.

Also nothing uses the size of the info structure, so don't update the
passed-in size (which is the size of the gop_handle table in bytes)
unnecessarily.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bhupesh Sharma <bhsharma@redhat.com>
Cc: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191206165542.31469-5-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-12 12:11:51 +01:00
..
broadcom tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
efi efi/gop: Fix memory leak in __gop_query32/64() 2020-01-12 12:11:51 +01:00
google gsmi: Fix bug in append_to_eventlog sysfs handler 2019-12-01 09:13:23 +01:00
meson firmware: meson-sm: Allow 0 as valid return value 2017-03-23 12:22:40 -07:00
tegra firmware: tegra: set drvdata earlier 2017-08-17 13:08:08 +02:00
arm_scpi.c ARM SCPI fixes for v4.14 2017-08-24 15:51:54 +02:00
dcdbas.c firmware/dcdbas: Constify attribute_group structures 2017-08-21 09:43:51 +02:00
dcdbas.h
dell_rbu.c firmware: dell_rbu: Make payload memory uncachable 2019-11-20 18:00:46 +01:00
dmi_scan.c firmware: dmi_scan: Fix UUID length safety check 2018-05-30 07:52:22 +02:00
dmi-id.c firmware: dmi: Fix permissions of product_family 2017-06-15 13:46:01 +02:00
dmi-sysfs.c x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings 2017-07-18 11:37:58 +02:00
edd.c [SCSI] edd: Treat "XPRS" host bus type the same as "PCI" 2011-10-31 13:26:19 +04:00
iscsi_ibft_find.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
iscsi_ibft.c iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND 2019-08-16 10:13:51 +02:00
Kconfig iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND 2019-08-16 10:13:51 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memmap.c drivers/firmware/memmap.c: fix kernel-doc format 2015-06-25 17:00:41 -07:00
pcdp.c x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings 2017-07-18 11:37:58 +02:00
pcdp.h Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
psci_checker.c sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h> 2017-03-02 08:42:27 +01:00
psci.c firmware/psci: Expose SMCCC version through psci_ops 2018-02-16 20:22:56 +01:00
qcom_scm-32.c firmware: qcom_scm: add two scm calls for iommu secure page table 2017-03-28 16:03:21 -05:00
qcom_scm-64.c firmware: qcom: scm: Ensure 'a0' status code is treated as signed 2019-12-17 20:39:58 +01:00
qcom_scm.c firmware: qcom_scm: add two scm calls for iommu secure page table 2017-03-28 16:03:21 -05:00
qcom_scm.h firmware: qcom_scm: add two scm calls for iommu secure page table 2017-03-28 16:03:21 -05:00
qemu_fw_cfg.c fw_cfg: fix driver remove 2018-08-17 21:01:11 +02:00
raspberrypi.c ARM: bcm2835: Add the Raspberry Pi firmware driver 2015-10-14 15:30:06 -07:00
scpi_pm_domain.c firmware: scpi: add device power domain support using genpd 2016-06-21 10:26:51 +01:00
ti_sci.c firmware: ti_sci: Always request response from firmware 2019-09-19 09:08:08 +02:00
ti_sci.h firmware: ti_sci: Add support for reboot core service 2016-10-27 12:09:12 +03:00