[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220705115620.223049942@linuxfoundation.org>
Date: Tue, 5 Jul 2022 13:58:30 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jean Delvare <jdelvare@...e.de>,
Mario Limonciello <mario.limonciello@....com>,
Henrique de Moraes Holschuh <hmh@....eng.br>,
Hans de Goede <hdegoede@...hat.com>,
Mark Gross <markgross@...nel.org>
Subject: [PATCH 5.18 064/102] platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource
From: Jean Delvare <jdelvare@...e.de>
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@...e.de>
Fixes: 455cd867b85b ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops")
Cc: Mario Limonciello <mario.limonciello@....com>
Cc: Henrique de Moraes Holschuh <hmh@....eng.br>
Cc: Hans de Goede <hdegoede@...hat.com>
Cc: Mark Gross <markgross@...nel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
Link: https://lore.kernel.org/r/20220621155511.5b266395@endymion.delvare
Signed-off-by: Hans de Goede <hdegoede@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
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
Powered by blists - more mailing lists