projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c393538
)
drm/xe: Use missing lock in relay_needs_worker
author
Nirmoy Das
<nirmoy.das@intel.com>
Mon, 3 Jun 2024 08:17:23 +0000
(10:17 +0200)
committer
Nirmoy Das
<nirmoy.das@intel.com>
Wed, 5 Jun 2024 07:52:13 +0000
(09:52 +0200)
Add missing lock that is protecting relay->incoming_actions.
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20240603081723.18775-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
drivers/gpu/drm/xe/xe_guc_relay.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/xe/xe_guc_relay.c
b/drivers/gpu/drm/xe/xe_guc_relay.c
index c3bbaf474f9ad801746d98ca4845d7ee7fb86ef6..ade6162dc2598713a1fee0d0f989b02fab3a8fe9 100644
(file)
--- a/
drivers/gpu/drm/xe/xe_guc_relay.c
+++ b/
drivers/gpu/drm/xe/xe_guc_relay.c
@@
-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)
{
- 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)