WSL2-Linux-Kernel/drivers/platform/x86
Aleksandr Mishin cff3cbba73 platform/x86: dell-smbios: Fix error path in dell_smbios_init()
[ Upstream commit ffc17e1479e8e9459b7afa80e5d9d40d0dd78abb ]

In case of error in build_tokens_sysfs(), all the memory that has been
allocated is freed at end of this function. But then free_group() is
called which performs memory deallocation again.

Also, instead of free_group() call, there should be exit_dell_smbios_smm()
and exit_dell_smbios_wmi() calls, since there is initialization, but there
is no release of resources in case of an error.

Fix these issues by replacing free_group() call with
exit_dell_smbios_wmi() and exit_dell_smbios_smm().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 33b9ca1e53 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Link: https://lore.kernel.org/r/20240830065428.9544-1-amishin@t-argos.ru
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:07:47 +02:00
..
dell platform/x86: dell-smbios: Fix error path in dell_smbios_init() 2024-09-12 11:07:47 +02:00
hp platform/x86: hp-wmi:: Mark driver struct with __refdata to prevent section mismatch warning 2023-10-19 23:05:33 +02:00
intel platform/x86: intel-vbtn: Update tablet mode switch at end of probe 2024-04-13 13:01:48 +02:00
Kconfig platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:36:33 +01:00
Makefile platform/x86: Move existing HP drivers to a new hp subdir 2023-05-24 17:36:48 +01:00
acer-wireless.c
acer-wmi.c platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017) 2022-12-02 17:41:10 +01:00
acerhdf.c
adv_swbutton.c
amd-pmc.c platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN 2023-02-22 12:57:05 +01:00
amilo-rfkill.c
apple-gmux.c
asus-laptop.c
asus-nb-wmi.c platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:36:33 +01:00
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: Fix kbd_dock_devid tablet-switch reporting 2023-12-13 18:36:46 +01:00
asus-wmi.h platform/x86: asus-wmi: Add support for ROG X13 tablet mode 2023-12-13 18:36:33 +01:00
classmate-laptop.c
compal-laptop.c
dual_accel_detect.h
eeepc-laptop.c
eeepc-wmi.c
firmware_attributes_class.c
firmware_attributes_class.h
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE 2023-04-26 13:51:51 +02:00
gpd-pocket-fan.c
hdaps.c
huawei-wmi.c platform/x86: huawei-wmi: Silence ambient light sensor 2023-09-19 12:22:28 +02:00
i2c-multi-instantiate.c
ibm_rtl.c
ideapad-laptop.c platform/x86: ideapad-laptop: Add Legion 5 15ARH05 DMI id to set_fn_lock_led_list[] 2023-01-18 11:48:51 +01:00
intel_ips.c
intel_ips.h
intel_scu_ipc.c platform/x86: intel_scu_ipc: Fail IPC send if still busy 2023-10-06 13:18:06 +02:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield 2023-06-09 10:32:20 +02:00
intel_scu_pltdrv.c
intel_scu_wdt.c
lg-laptop.c platform/x86: lg-laptop: fix %s null argument warning 2024-09-04 13:23:28 +02:00
meraki-mx100.c
mlx-platform.c
msi-laptop.c platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100 2023-08-03 10:22:35 +02:00
msi-wmi.c
mxm-wmi.c platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]() 2022-12-31 13:14:05 +01:00
panasonic-laptop.c platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses 2022-07-07 17:53:34 +02:00
pcengines-apuv2.c
peaq-wmi.c
pmc_atom.c platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask 2022-09-08 12:28:01 +02:00
samsung-laptop.c
samsung-q10.c
sony-laptop.c platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe 2023-01-18 11:48:51 +01:00
system76_acpi.c
think-lmi.c platform/x86: think-lmi: Fix reference leak 2023-10-19 23:05:33 +02:00
think-lmi.h
thinkpad_acpi.c platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e 2023-11-28 16:56:16 +00:00
topstar-laptop.c
toshiba-wmi.c
toshiba_acpi.c
toshiba_bluetooth.c
toshiba_haps.c
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add info for the EZpad 6s Pro 2024-07-18 13:07:35 +02:00
uv_sysfs.c
wireless-hotkey.c platform/x86: wireless-hotkey: Add support for LG Airplane Button 2024-07-27 10:46:11 +02:00
wmi-bmof.c
wmi.c platform/x86: wmi: Skip blocks with zero instances 2023-12-13 18:36:33 +01:00
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c