]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:25 +0000 (10:23 +0200)
commit68fc8f1e9103021ab489dce3732fe3beb814b736
treef2a69974fe80de997920915811bcbe0f0214220b
parent7046212603e0689f9155f70923a5b9e6608eaaeb
drm/scheduler: use job count instead of peek

[ Upstream commit e1b4ce25dbc93ab0cb8ed0f236a3b9ff7b03802c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/scheduler/sched_entity.c