mirror of https://gitee.com/openkylin/linux.git
45ca3f76de
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
coreboot_table-acpi.c | ||
coreboot_table-of.c | ||
coreboot_table.c | ||
coreboot_table.h | ||
framebuffer-coreboot.c | ||
gsmi.c | ||
memconsole-coreboot.c | ||
memconsole-x86-legacy.c | ||
memconsole.c | ||
memconsole.h | ||
vpd.c | ||
vpd_decode.c | ||
vpd_decode.h |