]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 18 Aug 2023 19:40:03 +0000 (14:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:00 +0000 (11:11 +0200)
commit1ea7e47807279369c82718efd2677ea25c6579e3
tree61c1b47b0f642fd3e1f1ee3db2bd18574b10c023
parentdc1d81ee9312dee73544ec88d356e644edd5c413
ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects

[ Upstream commit 883cf0d4cf288313b71146ddebdf5d647b76c78b ]

If a badly constructed firmware includes multiple `ACPI_TYPE_PACKAGE`
objects while evaluating the AMD LPS0 _DSM, there will be a memory
leak.  Explicitly guard against this.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/x86/s2idle.c