linux/drivers/firmware/google
Anton Vasilyev 45ca3f76de firmware: vpd: Fix section enabled flag on vpd_section_destroy
static struct ro_vpd and rw_vpd are initialized by vpd_sections_init()
in vpd_probe() based on header's ro and rw sizes.
In vpd_remove() vpd_section_destroy() performs deinitialization based
on enabled flag, which is set to true by vpd_sections_init().
This leads to call of vpd_section_destroy() on already destroyed section
for probe-release-probe-release sequence if first probe performs
ro_vpd initialization and second probe does not initialize it.

The patch adds changing enabled flag on vpd_section_destroy and adds
cleanup on the error path of vpd_sections_init.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 10:34:12 +02:00
..
coreboot_table-acpi.c firmware: coreboot: Expose the coreboot table as a bus 2018-04-23 13:37:19 +02:00
coreboot_table-of.c firmware: coreboot: Expose the coreboot table as a bus 2018-04-23 13:37:19 +02:00
coreboot_table.c firmware: coreboot: Remove unused coreboot_table_find 2018-04-23 13:37:19 +02:00
coreboot_table.h firmware: coreboot: Add coreboot framebuffer driver 2018-04-23 13:37:19 +02:00
framebuffer-coreboot.c firmware: coreboot: Add coreboot framebuffer driver 2018-04-23 13:37:19 +02:00
gsmi.c
Kconfig firmware: coreboot: Add coreboot framebuffer driver 2018-04-23 13:37:19 +02:00
Makefile firmware: coreboot: Add coreboot framebuffer driver 2018-04-23 13:37:19 +02:00
memconsole-coreboot.c firmware: memconsole: Probe via coreboot bus 2018-04-23 13:37:19 +02:00
memconsole-x86-legacy.c
memconsole.c
memconsole.h
vpd_decode.c
vpd_decode.h
vpd.c firmware: vpd: Fix section enabled flag on vpd_section_destroy 2018-08-02 10:34:12 +02:00