summaryrefslogtreecommitdiff
path: root/drivers/tee/amdtee/amdtee_private.h
diff options
context:
space:
mode:
authorRijo Thomas <Rijo-john.Thomas@amd.com>2020-11-04 11:56:10 +0530
committerJens Wiklander <jens.wiklander@linaro.org>2020-11-09 08:59:00 +0100
commitbe353be27874f40837327d9a39e3ad2149ab66d3 (patch)
tree7cbc8335376bcc367e79204311128405a11930ca /drivers/tee/amdtee/amdtee_private.h
parentff1f855804cdbbb6db7b9b6df6cab783d1a40d66 (diff)
downloadlinux-next-be353be27874f40837327d9a39e3ad2149ab66d3.tar.gz
tee: amdtee: synchronize access to shm list
Synchronize access to shm or shared memory buffer list to prevent race conditions due to concurrent updates to shared shm list by multiple threads. 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/amdtee_private.h')
-rw-r--r--drivers/tee/amdtee/amdtee_private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tee/amdtee/amdtee_private.h b/drivers/tee/amdtee/amdtee_private.h
index 97df16a17285..337c8d82f74e 100644
--- a/drivers/tee/amdtee/amdtee_private.h
+++ b/drivers/tee/amdtee/amdtee_private.h
@@ -70,6 +70,7 @@ struct amdtee_session {
struct amdtee_context_data {
struct list_head sess_list;
struct list_head shm_list;
+ struct mutex shm_mutex; /* synchronizes access to @shm_list */
};
struct amdtee_driver_data {