summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch')
-rw-r--r--debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch b/debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch
new file mode 100644
index 000000000..f84843891
--- /dev/null
+++ b/debian/patches-rt/0325-hrtimer-fix-logic-for-when-grabbing-softirq_expiry_l.patch
@@ -0,0 +1,50 @@
+From f3c5f444176119ec51e092dc9b9edea7a679c55e Mon Sep 17 00:00:00 2001
+From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+Date: Tue, 28 Apr 2020 16:40:26 +0200
+Subject: [PATCH 325/347] hrtimer: fix logic for when grabbing
+ softirq_expiry_lock can be elided
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+Commit
+
+ hrtimer: Add a missing bracket and hide `migration_base' on !SMP
+
+which is 47b6de0b7f22 in 5.2-rt and 40aae5708e7a in 4.19-rt,
+inadvertently changed the logic from base != &migration_base to base
+== &migration_base.
+
+On !CONFIG_SMP, the effect was to effectively always elide this
+lock/unlock pair (since is_migration_base() is unconditionally false),
+which for me consistently causes lockups during reboot, and reportedly
+also often causes a hang during boot.
+
+Adding this logical negation (or, what is effectively the same thing
+on !CONFIG_SMP, reverting the above commit as well as "hrtimer:
+Prevent using hrtimer_grab_expiry_lock() on migration_base") fixes
+that lockup.
+
+Fixes: 40aae5708e7a (hrtimer: Add a missing bracket and hide `migration_base' on !SMP) # 4.19-rt
+Fixes: 47b6de0b7f22 (hrtimer: Add a missing bracket and hide `migration_base' on !SMP) # 5.2-rt
+Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Signed-off-by: Tom Zanussi <zanussi@kernel.org>
+---
+ kernel/time/hrtimer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index 0f841f18c363..a84673149881 100644
+--- a/kernel/time/hrtimer.c
++++ b/kernel/time/hrtimer.c
+@@ -971,7 +971,7 @@ void hrtimer_grab_expiry_lock(const struct hrtimer *timer)
+ {
+ struct hrtimer_clock_base *base = READ_ONCE(timer->base);
+
+- if (timer->is_soft && is_migration_base(base)) {
++ if (timer->is_soft && !is_migration_base(base)) {
+ spin_lock(&base->cpu_base->softirq_expiry_lock);
+ spin_unlock(&base->cpu_base->softirq_expiry_lock);
+ }
+--
+2.36.1
+