FAILED: patch "[PATCH] drm/sched: Fix race in drm_sched_entity_select_rq()" failed to apply to 6.1-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x d25e3a610bae03bffc5c14b5d944a5d0cd844678
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025110343-daffodil-target-5d2b@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d25e3a610bae03bffc5c14b5d944a5d0cd844678 Mon Sep 17 00:00:00 2001
From: Philipp Stanner <[email protected]>
Date: Wed, 22 Oct 2025 08:34:03 +0200
Subject: [PATCH] drm/sched: Fix race in drm_sched_entity_select_rq()
In a past bug fix it was forgotten that entity access must be protected by the entity lock. That's a data race and potentially UB.
Move the spin_unlock() to the appropriate position.
drivers/gpu/drm/scheduler/sched_entity.c +2 -1
@@ -552,10 +552,11 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity)drm_sched_rq_remove_entity (entity->rq, entity); entity->rq = rq; } -spin_unlock (&entity->lock);if (entity->num_sched_list ==1 ) entity->sched_list =NULL ; + +spin_unlock (&entity->lock); }/**
Sasha Levin
maintainerPATCH 1/1 drm/sched: Fix race in drm_sched_entity_select_rq()
From: Philipp Stanner <[email protected]>
[ Upstream commit d25e3a610bae03bffc5c14b5d944a5d0cd844678 ]
In a past bug fix it was forgotten that entity access must be protected by the entity lock. That's a data race and potentially UB.
Move the spin_unlock() to the appropriate position.
--- drivers/gpu/drm/scheduler/sched_entity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/scheduler/sched_entity.c +2 -1
@@ -471,10 +471,11 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity)drm_sched_rq_remove_entity (entity->rq, entity); entity->rq = rq; } -spin_unlock (&entity->rq_lock);if (entity->num_sched_list ==1 ) entity->sched_list =NULL ; + +spin_unlock (&entity->rq_lock); }/**
Signature · 1 line
2.51.0