This is a note to let you know that I've just added the patch titled platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: platform-x86-thinkpad_acpi-fix-a-memory-leak-of-efch-mmio-resource.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d2f33f0c3ad7b0d5262d9b986f1353265fad7a08 Mon Sep 17 00:00:00 2001 From: Jean Delvare <jdelvare@xxxxxxx> Date: Tue, 21 Jun 2022 15:55:11 +0200 Subject: platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource From: Jean Delvare <jdelvare@xxxxxxx> commit d2f33f0c3ad7b0d5262d9b986f1353265fad7a08 upstream. Unlike release_mem_region(), a call to release_resource() does not free the resource, so it has to be freed explicitly to avoid a memory leak. Signed-off-by: Jean Delvare <jdelvare@xxxxxxx> Fixes: 455cd867b85b ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops") Cc: Mario Limonciello <mario.limonciello@xxxxxxx> Cc: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> Cc: Hans de Goede <hdegoede@xxxxxxxxxx> Cc: Mark Gross <markgross@xxxxxxxxxx> Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx> Link: https://lore.kernel.org/r/20220621155511.5b266395@endymion.delvare Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index e6cb4a14cdd4..aa6ffeaa3932 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -4529,6 +4529,7 @@ static void thinkpad_acpi_amd_s2idle_restore(void) iounmap(addr); cleanup_resource: release_resource(res); + kfree(res); } static struct acpi_s2idle_dev_ops thinkpad_acpi_s2idle_dev_ops = { -- 2.37.0 Patches currently in stable-queue which might be from jdelvare@xxxxxxx are queue-5.18/platform-x86-thinkpad_acpi-fix-a-memory-leak-of-efch-mmio-resource.patch