summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-07-04 04:17:44 +0300
committerDave Airlie <airlied@redhat.com>2019-07-04 04:17:48 +0300
commita956c56b6ad3c2812cf6158eaa579c4f4012e7ab (patch)
treecd5840e020118af0f3f19ff562a26a3b82d49705
parent5ee5d30a814d1310276cc023df1cf503d4c8d10f (diff)
parent2f040d27080ddfffecff2be1a77107c494d0e4f4 (diff)
downloadlinux-a956c56b6ad3c2812cf6158eaa579c4f4012e7ab.tar.xz
Merge tag 'drm-misc-fixes-2019-07-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
panfrost- Avoid double free by deleting GEM handle in create_bo failure path (Boris) Cc: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20190704001302.GA260390@art_vandelay
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index d11e2281dde6..7e43b25785f7 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -63,7 +63,7 @@ static int panfrost_ioctl_create_bo(struct drm_device *dev, void *data,
return 0;
err_free:
- drm_gem_object_put_unlocked(&shmem->base);
+ drm_gem_handle_delete(file, args->handle);
return ret;
}