Patch "interconnect: Teach lockdep about icc_bw_lock order" has been added to the 5.15-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

    interconnect: Teach lockdep about icc_bw_lock order

to the 5.15-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:
     interconnect-teach-lockdep-about-icc_bw_lock-order.patch
and it can be found in the queue-5.15 subdirectory.

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


>From 13619170303878e1dae86d9a58b039475c957fcf Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@xxxxxxxxxxxx>
Date: Mon, 7 Aug 2023 10:11:41 -0700
Subject: interconnect: Teach lockdep about icc_bw_lock order

From: Rob Clark <robdclark@xxxxxxxxxxxx>

commit 13619170303878e1dae86d9a58b039475c957fcf upstream.

Teach lockdep that icc_bw_lock is needed in code paths that could
deadlock if they trigger reclaim.

Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20230807171148.210181-8-robdclark@xxxxxxxxx
Signed-off-by: Georgi Djakov <djakov@xxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Cc: Jon Hunter <jonathanh@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/interconnect/core.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -1135,13 +1135,21 @@ void icc_sync_state(struct device *dev)
 			}
 		}
 	}
+	mutex_unlock(&icc_bw_lock);
 	mutex_unlock(&icc_lock);
 }
 EXPORT_SYMBOL_GPL(icc_sync_state);
 
 static int __init icc_init(void)
 {
-	struct device_node *root = of_find_node_by_path("/");
+	struct device_node *root;
+
+	/* Teach lockdep about lock ordering wrt. shrinker: */
+	fs_reclaim_acquire(GFP_KERNEL);
+	might_lock(&icc_bw_lock);
+	fs_reclaim_release(GFP_KERNEL);
+
+	root = of_find_node_by_path("/");
 
 	providers_count = of_count_icc_providers(root);
 	of_node_put(root);


Patches currently in stable-queue which might be from robdclark@xxxxxxxxxxxx are

queue-5.15/interconnect-fix-locking-for-runpm-vs-reclaim.patch
queue-5.15/interconnect-teach-lockdep-about-icc_bw_lock-order.patch



[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