mirror of https://gitee.com/openkylin/linux.git
- Fix memory leak in gpu debugfs node's release (Johan)
Cc: Johan Hovold <johan@kernel.org> -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEHF6rntfJ3enn8gh8cywAJXLcr3kFAl3McTAACgkQcywAJXLc r3nCRwgAxsG4u92NPFjTAyOV6d8/p0JlaovmCy0Gn2Mt3q+3WZ0DqXGlFL/qVVhn T4gDKZwxdw1UKc/DaAnPzBz/JiVQXNih5ClS73mHba/N4r7p2muuskn0t4zh3yl2 yrP0mgAZRm05GSsqVjCv17igtnoHdmyJacWKjk9rdBgPxFwBvWj/cHZPJelOgcS9 iPWBIvQZ9WA3WTWS7gqFL/8mOzjU8buVfoE5lljQojrwUkjtkuA1KPq0JziUvIop 7nQW2MVvjvSC3nhBN/NdRnh293g5LWKqYB1MA+B2v1fcmW2EQsoNmEH3cKN4x30M lM7Rx29OFLIt2K78HDeLiq/nM+b7aQ== =UcFZ -----END PGP SIGNATURE----- Merge tag 'drm-misc-next-fixes-2019-11-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Fix memory leak in gpu debugfs node's release (Johan) Cc: Johan Hovold <johan@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20191113211056.GA78440@art_vandelay
This commit is contained in:
commit
3447fd0c9d
|
@ -47,12 +47,8 @@ static int msm_gpu_release(struct inode *inode, struct file *file)
|
||||||
struct msm_gpu_show_priv *show_priv = m->private;
|
struct msm_gpu_show_priv *show_priv = m->private;
|
||||||
struct msm_drm_private *priv = show_priv->dev->dev_private;
|
struct msm_drm_private *priv = show_priv->dev->dev_private;
|
||||||
struct msm_gpu *gpu = priv->gpu;
|
struct msm_gpu *gpu = priv->gpu;
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = mutex_lock_interruptible(&show_priv->dev->struct_mutex);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
|
mutex_lock(&show_priv->dev->struct_mutex);
|
||||||
gpu->funcs->gpu_state_put(show_priv->state);
|
gpu->funcs->gpu_state_put(show_priv->state);
|
||||||
mutex_unlock(&show_priv->dev->struct_mutex);
|
mutex_unlock(&show_priv->dev->struct_mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue