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. Change-Id: If70731f517bcb47d4515f131fecafe702064cb45 Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
a6400b2c81
commit
45380adf38
@@ -1443,7 +1443,7 @@ void msm_mode_object_event_notify(struct drm_mode_object *obj,
|
|||||||
|
|
||||||
static int msm_release(struct inode *inode, struct file *filp)
|
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_minor *minor;
|
||||||
struct drm_device *dev;
|
struct drm_device *dev;
|
||||||
struct msm_drm_private *priv;
|
struct msm_drm_private *priv;
|
||||||
@@ -1455,6 +1455,7 @@ static int msm_release(struct inode *inode, struct file *filp)
|
|||||||
|
|
||||||
mutex_lock(&msm_release_lock);
|
mutex_lock(&msm_release_lock);
|
||||||
|
|
||||||
|
file_priv = filp->private_data;
|
||||||
if (!file_priv) {
|
if (!file_priv) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto end;
|
goto end;
|
||||||
|
Reference in New Issue
Block a user