]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/scheduler: use job count instead of peek
authorChristian König <christian.koenig@amd.com>
Fri, 9 Aug 2019 15:27:21 +0000 (17:27 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Aug 2019 15:52:10 +0000 (10:52 -0500)
commit85cb9d506744742ac06114a794fe58a964a24a62
treef3bbd7e054ef33069e86d4a785e60329430a6a50
parent2568cedc130866ddca7b7d85824b5d237d2d3812
drm/scheduler: use job count instead of peek

The spsc_queue_peek function is accessing queue->head which belongs to
the consumer thread and shouldn't be accessed by the producer

This is fixing a rare race condition when destroying entities.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Monk.liu@amd.com
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/scheduler/sched_entity.c