From: jsg Date: Fri, 11 Oct 2024 02:50:17 +0000 (+0000) Subject: drm/sched: Add locking to drm_sched_entity_modify_sched X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b9c19e8727ff00303c5aa7d60c1ab0e8e29c6f2d;p=openbsd drm/sched: Add locking to drm_sched_entity_modify_sched From Tvrtko Ursulin 579a0a84e3c0174f296004ac4af83cd9819b38a9 in linux-6.6.y/6.6.55 4286cc2c953983d44d248c9de1c81d3a9643345c in mainline linux --- diff --git a/sys/dev/pci/drm/scheduler/sched_entity.c b/sys/dev/pci/drm/scheduler/sched_entity.c index 1d6409f54d5..4322a622193 100644 --- a/sys/dev/pci/drm/scheduler/sched_entity.c +++ b/sys/dev/pci/drm/scheduler/sched_entity.c @@ -111,8 +111,10 @@ void drm_sched_entity_modify_sched(struct drm_sched_entity *entity, { WARN_ON(!num_sched_list || !sched_list); + spin_lock(&entity->rq_lock); entity->sched_list = sched_list; entity->num_sched_list = num_sched_list; + spin_unlock(&entity->rq_lock); } EXPORT_SYMBOL(drm_sched_entity_modify_sched);