mirror-linux/drivers/gpu/drm/msm
Rob Clark c498e5d392 drm/msm: Fix submit error-path leaks
[ Upstream commit 68dc6c2d5e ]

For errors after msm_submitqueue_get(), we need to drop the submitqueue
reference.  Additionally after get_unused_fd() we need to drop the fd.
The ordering for dropping the queue lock and put_unused_fd() is not
important, so just move this all into out_post_unlock.

v2: Only drop queue ref if submit doesn't take it
v3: Fix unitialized submit ref in error path
v4: IS_ERR_OR_NULL()

Reported-by: pinkperfect2021@gmail.com
Fixes: f0de40a131 drm/msm: ("Reorder lock vs submit alloc")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/536073/
Link: https://lore.kernel.org/r/20230509203041.440619-1-robdclark@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:32:43 +01:00
..
adreno drm/msm: Hangcheck progress detection 2023-05-17 11:53:53 +02:00
disp drm/msm/dpu: Remove duplicate register defines from INTF 2023-05-24 17:32:43 +01:00
dp drm/msm/dp: unregister audio driver during unbind 2023-05-24 17:32:42 +01:00
dsi drm/msm/dsi: Add missing check for alloc_ordered_workqueue 2023-03-10 09:33:57 +01:00
hdmi drm/msm/hdmi: Add missing check for alloc_ordered_workqueue 2023-03-10 09:33:10 +01:00
Kconfig
Makefile
NOTES
msm_atomic.c
msm_atomic_trace.h
msm_atomic_tracepoints.c
msm_debugfs.c
msm_debugfs.h
msm_drv.c drm/msm: fix missing wq allocation error handling 2023-05-17 11:53:53 +02:00
msm_drv.h drm/msm: Hangcheck progress detection 2023-05-17 11:53:53 +02:00
msm_fb.c
msm_fbdev.c
msm_fence.c drm/msm: use strscpy instead of strncpy 2023-03-10 09:33:15 +01:00
msm_fence.h
msm_gem.c
msm_gem.h
msm_gem_prime.c
msm_gem_shrinker.c drm/msm/gem: Prevent blocking within shrinker loop 2023-03-22 13:33:39 +01:00
msm_gem_submit.c drm/msm: Fix submit error-path leaks 2023-05-24 17:32:43 +01:00
msm_gem_vma.c
msm_gpu.c drm/msm: Hangcheck progress detection 2023-05-17 11:53:53 +02:00
msm_gpu.h drm/msm: Hangcheck progress detection 2023-05-17 11:53:53 +02:00
msm_gpu_devfreq.c
msm_gpu_trace.h
msm_gpu_tracepoints.c
msm_gpummu.c
msm_io_utils.c
msm_iommu.c
msm_kms.h
msm_mdss.c drm/msm/dpu: Fix memory leak in msm_mdss_parse_data_bus_icc_path 2023-01-18 11:58:23 +01:00
msm_mmu.h
msm_perf.c
msm_rd.c
msm_ringbuffer.c
msm_ringbuffer.h drm/msm: Hangcheck progress detection 2023-05-17 11:53:53 +02:00
msm_submitqueue.c