diff options
| author | Thadeu Lima de Souza Cascardo <cascardo@igalia.com> | 2026-08-26 08:46:58 -0300 |
|---|---|---|
| committer | Melissa Wen <melissa.srw@gmail.com> | 2026-09-11 11:14:50 -0300 |
| commit | 9eb1a393c89a79c4210230d23e7d88d239c61d7b (patch) | |
| tree | a6e9d0409364b3bb070c15ae4d59045dec9947fa /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 06dd5e1ae8ce4e129791087c8c66594950f0ba03 (diff) | |
| download | linux-next-9eb1a393c89a79c4210230d23e7d88d239c61d7b.tar.gz linux-next-9eb1a393c89a79c4210230d23e7d88d239c61d7b.zip | |
drm: Fix drm_pending_vblank_event leak in error path for out_fence_ptr
When an out_fence_ptr is provided but DRM_MODE_PAGE_FLIP_EVENT is not
set, a drm_pending_vblank_event will be allocated. If later, there is an
allocation failure or another failure at setup_out_fence(), that event
will not have base.fence set and it will not be released at
complete_signaling().
Release the event and set crtc_state->event to NULL just like in the
DRM_MODE_PAGE_FLIP_EVENT case when there is a failure at
drm_event_reserve_init(). That is, prepare_signaling() releases the
event and there is nothing to be done at complete_signaling(). Use
drm_event_cancel_free() as that will also undo drm_event_reserve_init()
in case it has been called.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260727-drm_crtc_atomic_commit_leak-v1-1-23d9948a9d7c@igalia.com?part=1
Fixes: 92c715fca907 ("drm/atomic: Fix double free in drm_atomic_state_default_clear")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Link: https://patch.msgid.link/20260826-drm_pending_vblank_event_leak-v4-1-f8de8b996b9d@igalia.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
