From 27b60379d1ae428773c2b28c255c87320b3ed1f2 Mon Sep 17 00:00:00 2001 From: Samantha Tran Date: Mon, 19 Aug 2019 11:55:14 -0700 Subject: [PATCH] disp: msm: get and release lock on msm_obj before put iova This change will acquire the proper lock before calling put_iova and release the lock on return. Change-Id: I04334597018a6041eab0107660b2d441f8e3cc92 Signed-off-by: Samantha Tran --- msm/msm_gem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/msm/msm_gem.c b/msm/msm_gem.c index 3554f22b65..b1f6a5e287 100644 --- a/msm/msm_gem.c +++ b/msm/msm_gem.c @@ -527,8 +527,11 @@ void msm_gem_aspace_domain_attach_detach_update( */ list_for_each_entry(msm_obj, &aspace->active_list, iova_list) { obj = &msm_obj->base; - if (obj->import_attach) + if (obj->import_attach) { + mutex_lock(&msm_obj->lock); put_iova(obj); + mutex_unlock(&msm_obj->lock); + } } } else { /* map active buffers */