]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Sep 2023 16:17:23 +0000 (18:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Sep 2023 16:17:23 +0000 (18:17 +0200)
added patches:
interconnect-teach-lockdep-about-icc_bw_lock-order.patch

queue-5.15/interconnect-teach-lockdep-about-icc_bw_lock-order.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/interconnect-teach-lockdep-about-icc_bw_lock-order.patch b/queue-5.15/interconnect-teach-lockdep-about-icc_bw_lock-order.patch
new file mode 100644 (file)
index 0000000..629e308
--- /dev/null
@@ -0,0 +1,47 @@
+From 13619170303878e1dae86d9a58b039475c957fcf Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdclark@chromium.org>
+Date: Mon, 7 Aug 2023 10:11:41 -0700
+Subject: interconnect: Teach lockdep about icc_bw_lock order
+
+From: Rob Clark <robdclark@chromium.org>
+
+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@chromium.org>
+Link: https://lore.kernel.org/r/20230807171148.210181-8-robdclark@gmail.com
+Signed-off-by: Georgi Djakov <djakov@kernel.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Cc: Jon Hunter <jonathanh@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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);
index e24e9816fcd99d522c42b489c6b7f1db8326eb34..01143e7b2a1f93b40cf1180f4555b6c747275af7 100644 (file)
@@ -100,3 +100,4 @@ drm-amd-display-fix-the-white-screen-issue-when-64gb-dram.patch
 drm-amdgpu-fix-amdgpu_cs_p1_user_fence.patch
 net-sched-retire-rsvp-classifier.patch
 drm-amd-display-enable-cursor-degamma-for-dcn3-drm-legacy-gamma.patch
+interconnect-teach-lockdep-about-icc_bw_lock-order.patch