Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b51ca6d1 authored by Krishna Manikandan's avatar Krishna Manikandan Committed by Alexander Grund
Browse files

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
parent 1626fc29
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1851,7 +1851,7 @@ static int msm_ioctl_submitqueue_close(struct drm_device *dev, void *data,

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;
@@ -1861,6 +1861,7 @@ 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;