summaryrefslogtreecommitdiff
path: root/drivers/tee/amdtee/call.c
diff options
context:
space:
mode:
authorRijo Thomas <Rijo-john.Thomas@amd.com>2020-11-04 09:26:09 +0300
committerJens Wiklander <jens.wiklander@linaro.org>2020-11-09 10:58:54 +0300
commitff1f855804cdbbb6db7b9b6df6cab783d1a40d66 (patch)
tree116cf55cf6abbda69fcff9e206af21d16bd5297e /drivers/tee/amdtee/call.c
parentbbf5c979011a099af5dc76498918ed7df445635b (diff)
downloadlinux-ff1f855804cdbbb6db7b9b6df6cab783d1a40d66.tar.xz
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: 757cc3e9ff1d ("tee: add AMD-TEE driver") Reviewed-by: Devaraj Rangasamy <Devaraj.Rangasamy@amd.com> Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee/amdtee/call.c')
0 files changed, 0 insertions, 0 deletions