Patch "drm/xe: fix unbalanced rpm put() with declare_wedged()" has been added to the 6.11-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: fix unbalanced rpm put() with declare_wedged()

to the 6.11-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-fix-unbalanced-rpm-put-with-declare_wedged.patch
and it can be found in the queue-6.11 subdirectory.

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



commit 5de0435885f689183952ace355ddc109d26ce951
Author: Matthew Auld <matthew.auld@xxxxxxxxx>
Date:   Wed Oct 9 09:48:10 2024 +0100

    drm/xe: fix unbalanced rpm put() with declare_wedged()
    
    [ Upstream commit 761f916af44279a99db4e78c5f5ee839b31107ea ]
    
    Technically the or_reset() means we call the action on failure, however
    that would lead to unbalanced rpm put(). Move the get() earlier to fix
    this. It should be extremely unlikely to ever trigger this in practice.
    
    Fixes: 90936a0a4c54 ("drm/xe: Don't suspend device upon wedge")
    Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
    Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
    Cc: Nirmoy Das <nirmoy.das@xxxxxxxxx>
    Reviewed-by: Matthew Brost <matthew.brost@xxxxxxxxx>
    Reviewed-by: Nirmoy Das <nirmoy.das@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20241009084808.204432-4-matthew.auld@xxxxxxxxx
    (cherry picked from commit a187c1b0a800565a4db6372268692aff99df7f53)
    Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 8a44a2b6dcbb6..fb394189d9e23 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -960,13 +960,13 @@ void xe_device_declare_wedged(struct xe_device *xe)
 		return;
 	}
 
+	xe_pm_runtime_get_noresume(xe);
+
 	if (drmm_add_action_or_reset(&xe->drm, xe_device_wedged_fini, xe)) {
 		drm_err(&xe->drm, "Failed to register xe_device_wedged_fini clean-up. Although device is wedged.\n");
 		return;
 	}
 
-	xe_pm_runtime_get_noresume(xe);
-
 	if (!atomic_xchg(&xe->wedged.flag, 1)) {
 		xe->needs_flr_on_fini = true;
 		drm_err(&xe->drm,




[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