Patch "drm/xe: Use missing lock in relay_needs_worker" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/xe: Use missing lock in relay_needs_worker

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-xe-use-missing-lock-in-relay_needs_worker.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c80fc2bb3557069c1781c0f00483aa559e2a882b
Author: Nirmoy Das <nirmoy.das@xxxxxxxxx>
Date:   Mon Jun 3 10:17:23 2024 +0200

    drm/xe: Use missing lock in relay_needs_worker
    
    [ Upstream commit 8b01f970ee890574b3607c85781354a765c849bd ]
    
    Add missing lock that is protecting relay->incoming_actions.
    
    Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
    Reviewed-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240603081723.18775-1-nirmoy.das@xxxxxxxxx
    Signed-off-by: Nirmoy Das <nirmoy.das@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
index c0a2d8d5d3b3..b49137ea6d84 100644
--- a/drivers/gpu/drm/xe/xe_guc_relay.c
+++ b/drivers/gpu/drm/xe/xe_guc_relay.c
@@ -757,7 +757,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)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux