diff options
author | Krishna Manikandan <mkrishn@codeaurora.org> | 2021-10-08 10:25:24 +0530 |
---|---|---|
committer | Joey Lin <linjoey@google.com> | 2022-01-27 08:59:23 +0000 |
commit | bbb6c3fc0f45f3ee3a584abf73dbc37781770d75 (patch) | |
tree | c843a2fcd1596bf1c7dfb088bda75a1f5f3b0910 | |
parent | 3609ed8847482d93dcec0ee4a4e771848f1af396 (diff) | |
download | display-drivers-bbb6c3fc0f45f3ee3a584abf73dbc37781770d75.tar.gz |
disp: msm: sde: protect file private structure with mutex lock
Access file private data structures inside the
mutex lock only to avoid use-after-free issues .
Bug:213239835
Change-Id: If70731f517bcb47d4515f131fecafe702064cb45
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Signed-off-by: linjoey <linjoey@google.com>
-rw-r--r-- | msm/msm_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/msm/msm_drv.c b/msm/msm_drv.c index 2b219cda..c3f58be9 100644 --- a/msm/msm_drv.c +++ b/msm/msm_drv.c @@ -1622,7 +1622,7 @@ void msm_mode_object_event_notify(struct drm_mode_object *obj, static int msm_release(struct inode *inode, struct file *filp) { - struct drm_file *file_priv = filp->private_data; + struct drm_file *file_priv; struct drm_minor *minor; struct drm_device *dev; struct msm_drm_private *priv; @@ -1634,6 +1634,7 @@ static int msm_release(struct inode *inode, struct file *filp) mutex_lock(&msm_release_lock); + file_priv = filp->private_data; if (!file_priv) { ret = -EINVAL; goto end; |