Skip to content
Commit ff1f8558 authored by Rijo Thomas's avatar Rijo Thomas Committed by Jens Wiklander
Browse files

tee: amdtee: fix memory leak due to reset of global shm list



The driver maintains a list of shared memory buffers along with their
mapped buffer id's in a global linked list. These buffers need to be
unmapped after use by the user-space client.

The global shared memory list is initialized to zero entries in the
function amdtee_open(). This clearing of list entries can be a source
for memory leak on secure side if the global linked list previously
held some mapped buffer entries allocated from another TEE context.

Fix potential memory leak issue by moving global shared memory list
to AMD-TEE driver context data structure.

Fixes: 757cc3e9 ("tee: add AMD-TEE driver")
Reviewed-by: default avatarDevaraj Rangasamy <Devaraj.Rangasamy@amd.com>
Signed-off-by: default avatarRijo Thomas <Rijo-john.Thomas@amd.com>
Signed-off-by: Jens Wiklander's avatarJens Wiklander <jens.wiklander@linaro.org>
parent bbf5c979
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment