1
0
Fork 0
alistair23-linux/drivers/gpu/drm/panfrost
Boris Brezillon 2f040d2708 drm/panfrost: Fix a double-free error
drm_gem_shmem_create_with_handle() returns a GEM object and attach a
handle to it. When the user closes the DRM FD, the core releases all
GEM handles along with their backing GEM objs, which can lead to a
double-free issue if panfrost_ioctl_create_bo() failed and went
through the err_free path where drm_gem_object_put_unlocked() is
called without deleting the associate handle.

Replace this drm_gem_object_put_unlocked() call by a
drm_gem_handle_delete() one to fix that.

Fixes: f3ba91228e ("drm/panfrost: Add initial panfrost driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190627172414.27231-1-boris.brezillon@collabora.com
2019-06-28 16:45:51 -06:00
..
Kconfig drm/panfrost: Require the simple_ondemand governor 2019-06-10 09:30:34 -06:00
Makefile
TODO
panfrost_devfreq.c drm/panfrost: make devfreq optional again 2019-06-10 09:30:20 -06:00
panfrost_devfreq.h
panfrost_device.c drm/panfrost: Add missing _fini() calls in panfrost_device_fini() 2019-05-13 09:51:13 -05:00
panfrost_device.h drm/panfrost: Prevent concurrent resets 2019-04-18 09:27:34 -05:00
panfrost_drv.c drm/panfrost: Fix a double-free error 2019-06-28 16:45:51 -06:00
panfrost_features.h
panfrost_gem.c drm/panfrost: Make sure a BO is only unmapped when appropriate 2019-06-18 09:26:28 -06:00
panfrost_gem.h drm/panfrost: Make sure a BO is only unmapped when appropriate 2019-06-18 09:26:28 -06:00
panfrost_gpu.c drm/panfrost: Show stored feature registers 2019-05-03 15:36:23 -05:00
panfrost_gpu.h
panfrost_issues.h
panfrost_job.c drm/panfrost: Prevent concurrent resets 2019-04-18 09:27:34 -05:00
panfrost_job.h
panfrost_mmu.c drm/panfrost: Make sure a BO is only unmapped when appropriate 2019-06-18 09:26:28 -06:00
panfrost_mmu.h
panfrost_regs.h