Commit af6db7e7 authored by Sean Paul's avatar Sean Paul Committed by Greg Kroah-Hartman
Browse files

drm: Clear state->acquire_ctx before leaving drm_atomic_helper_commit_duplicated_state()



[ Upstream commit aa394b0d ]

drm_atomic_helper_commit_duplicated_state() sets state->acquire_ctx to
the context given in the argument and leaves it in state after it
quits. The lifetime of state and context are not guaranteed to be the
same, so we shouldn't leave that pointer hanging around. This patch
resets the context to NULL to avoid any oopses.

Changes in v2:
- Added to the set

Suggested-by: default avatarDaniel Vetter <daniel@ffwll.ch>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20181129150423.239081-1-sean@poorly.run


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2f0fb76b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment