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: Ibae25aa31eeb7a7afada3dd0ecc236615223dfc9 Signed-off-by: srikanthreddy ponogoti <sponogot@codeaurora.org>
This commit is contained in:
parent
4e5159084d
commit
cd3a09b4df
1 changed files with 2 additions and 1 deletions
|
|
@ -1421,7 +1421,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;
|
||||
|
|
@ -1433,6 +1433,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue