Commit 8b01f970 authored by Nirmoy Das's avatar Nirmoy Das

drm/xe: Use missing lock in relay_needs_worker

Add missing lock that is protecting relay->incoming_actions.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240603081723.18775-1-nirmoy.das@intel.comSigned-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
parent c393538e
...@@ -761,7 +761,14 @@ static void relay_process_incoming_action(struct xe_guc_relay *relay) ...@@ -761,7 +761,14 @@ static void relay_process_incoming_action(struct xe_guc_relay *relay)
static bool relay_needs_worker(struct xe_guc_relay *relay) static bool relay_needs_worker(struct xe_guc_relay *relay)
{ {
return !list_empty(&relay->incoming_actions); bool is_empty;
spin_lock(&relay->lock);
is_empty = list_empty(&relay->incoming_actions);
spin_unlock(&relay->lock);
return !is_empty;
} }
static void relay_kick_worker(struct xe_guc_relay *relay) static void relay_kick_worker(struct xe_guc_relay *relay)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment