summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-03-27 13:03:17 +1000
committerDave Airlie <airlied@redhat.com>2020-03-27 13:03:17 +1000
commitc4b979ebcafe978338cad1df4c77cdc8f84bd51c (patch)
tree37f731f5762a0650835f782b520cfee8b11db8f8
parent5117c363eb213d5503f5b7e39c9bfafd46388184 (diff)
parent3c0fdf3302cb4f186c871684eac5c407a107e480 (diff)
Merge tag 'amd-drm-fixes-5.6-2020-03-26' of git://people.freedesktop.org/~agd5f/linux into drm-fixesdrm-fixes-2020-03-27drm-fixes
amd-drm-fixes-5.6-2020-03-26: Scheduler: - Fix a race condition that could result in a segfault Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200326144538.3937-1-alexander.deucher@amd.com
-rw-r--r--drivers/gpu/drm/scheduler/sched_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 71ce6215956f..60c4c6a1aac6 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -661,7 +661,9 @@ static void drm_sched_process_job(struct dma_fence *f, struct dma_fence_cb *cb)
trace_drm_sched_process_job(s_fence);
+ dma_fence_get(&s_fence->finished);
drm_sched_fence_finished(s_fence);
+ dma_fence_put(&s_fence->finished);
wake_up_interruptible(&sched->wake_up_worker);
}