summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0110-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
commitb15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch)
tree1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0110-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch
parentAdding upstream version 5.10.209. (diff)
downloadlinux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.tar.xz
linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.zip
Adding debian version 5.10.209-2.debian/5.10.209-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches-rt/0110-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/patches-rt/0110-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch b/debian/patches-rt/0110-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch
new file mode 100644
index 000000000..e9c3583b7
--- /dev/null
+++ b/debian/patches-rt/0110-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch
@@ -0,0 +1,49 @@
+From e215644e77fc149727b2ed1c3412c2e7668ff5aa Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Mon, 11 Feb 2019 10:40:46 +0100
+Subject: [PATCH 110/323] mm: workingset: replace IRQ-off check with a lockdep
+ assert.
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz
+
+Commit
+
+ 68d48e6a2df57 ("mm: workingset: add vmstat counter for shadow nodes")
+
+introduced an IRQ-off check to ensure that a lock is held which also
+disabled interrupts. This does not work the same way on -RT because none
+of the locks, that are held, disable interrupts.
+Replace this check with a lockdep assert which ensures that the lock is
+held.
+
+Cc: Peter Zijlstra <peterz@infradead.org>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/workingset.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/mm/workingset.c b/mm/workingset.c
+index 975a4d2dd02e..c3d098c01052 100644
+--- a/mm/workingset.c
++++ b/mm/workingset.c
+@@ -432,6 +432,8 @@ static struct list_lru shadow_nodes;
+
+ void workingset_update_node(struct xa_node *node)
+ {
++ struct address_space *mapping;
++
+ /*
+ * Track non-empty nodes that contain only shadow entries;
+ * unlink those that contain pages or are being freed.
+@@ -440,7 +442,8 @@ void workingset_update_node(struct xa_node *node)
+ * already where they should be. The list_empty() test is safe
+ * as node->private_list is protected by the i_pages lock.
+ */
+- VM_WARN_ON_ONCE(!irqs_disabled()); /* For __inc_lruvec_page_state */
++ mapping = container_of(node->array, struct address_space, i_pages);
++ lockdep_assert_held(&mapping->i_pages.xa_lock);
+
+ if (node->count && node->count == node->nr_values) {
+ if (list_empty(&node->private_list)) {
+--
+2.43.0
+