lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250715-upstream-optee-rtc-v1-1-e0fdf8aae545@foss.st.com>
Date: Tue, 15 Jul 2025 16:07:13 +0200
From: Clément Le Goffic <clement.legoffic@...s.st.com>
To: Clément Léger <clement.leger@...tlin.com>,
        Alexandre
 Belloni <alexandre.belloni@...tlin.com>,
        Jens Wiklander
	<jens.wiklander@...aro.org>
CC: <linux-rtc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Clément Le Goffic <clement.legoffic@...s.st.com>,
        <linux-stm32@...md-mailman.stormreply.com>
Subject: [PATCH 1/3] rtc: rtc-optee: fix memory leak on driver removal

Fix a memory leak in case of driver removal.
Free the shared memory used for arguments exchanges between kernel and
OP-TEE RTC PTA.

Fixes: 81c2f059ab90 ("rtc: optee: add RTC driver for OP-TEE RTC PTA")
Signed-off-by: Clément Le Goffic <clement.legoffic@...s.st.com>
---
 drivers/rtc/rtc-optee.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
index 9f8b5d4a8f6b..6b77c122fdc1 100644
--- a/drivers/rtc/rtc-optee.c
+++ b/drivers/rtc/rtc-optee.c
@@ -320,6 +320,7 @@ static int optee_rtc_remove(struct device *dev)
 {
 	struct optee_rtc *priv = dev_get_drvdata(dev);
 
+	tee_shm_free(priv->shm);
 	tee_client_close_session(priv->ctx, priv->session_id);
 	tee_client_close_context(priv->ctx);
 

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ