]> git.baikalelectronics.ru Git - kernel.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>
Wed, 14 Aug 2019 20:45:53 +0000 (15:45 -0500)
commitf5a334315592031f241e4cc9ee82bd4aa2abac30
tree2d6fed0206a76b9cfa53001ce820922bcc803253
parentf96629aef3a8d8f77c3c4954a3190b65972a5bbe
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