linux/drivers/firmware/efi
Dan Carpenter adba19f31c efi: Fix error handling in add_sysfs_runtime_map_entry()
commit d67e199611 upstream.

I spotted two (difficult to hit) bugs while reviewing this.

1)  There is a double free bug because we unregister "map_kset" in
    add_sysfs_runtime_map_entry() and also efi_runtime_map_init().
2)  If we fail to allocate "entry" then we should return
    ERR_PTR(-ENOMEM) instead of NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2015-05-20 13:26:05 +01:00
..
arm-stub.c efi/arm64: ignore dtb= when UEFI SecureBoot is enabled 2014-04-30 19:57:06 +01:00
cper.c Move cper.c from drivers/acpi/apei to drivers/firmware/efi 2013-10-31 11:27:04 -07:00
efi-pstore.c efi-pstore: Fix an overflow on 32-bit builds 2014-06-27 07:30:32 +01:00
efi-stub-helper.c efi/libstub: Fix boundary checking in efi_high_alloc() 2015-03-18 14:42:04 +00:00
efi.c efi: fdt: Do not report an error during boot if UEFI is not available 2014-07-10 11:02:48 +01:00
efivars.c efivars: Add compatibility code for compat tasks 2014-04-17 13:53:53 +01:00
fdt.c efi/arm64: efistub: remove local copy of linux_banner 2014-07-07 07:26:02 +01:00
Kconfig efi: add helper function to get UEFI params from FDT 2014-04-30 19:49:46 +01:00
Makefile efi/reboot: Add generic wrapper around EfiResetSystem() 2015-05-12 09:36:34 +01:00
reboot.c x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag 2015-05-12 09:36:34 +01:00
runtime-map.c efi: Fix error handling in add_sysfs_runtime_map_entry() 2015-05-20 13:26:05 +01:00
vars.c firmware: Do not use WARN_ON(!spin_is_locked()) 2014-09-17 09:21:52 -07:00