summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:22:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:26:40 +0000
commit08f003891b84f52e49a5bdbc8a589fb052ac9a4e (patch)
treeb7e426b4a4eb48e9e71188a2812a4c71625c35ac /debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch
parentMerging upstream version 4.19.260. (diff)
downloadlinux-08f003891b84f52e49a5bdbc8a589fb052ac9a4e.tar.xz
linux-08f003891b84f52e49a5bdbc8a589fb052ac9a4e.zip
Merging debian version 4.19.260-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch')
-rw-r--r--debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch b/debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch
new file mode 100644
index 000000000..0101e802e
--- /dev/null
+++ b/debian/patches-rt/0291-x86-preempt-Check-preemption-level-before-looking-at.patch
@@ -0,0 +1,30 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 14 Aug 2019 17:08:58 +0200
+Subject: [PATCH 291/342] x86: preempt: Check preemption level before looking
+ at lazy-preempt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cbcd32705234c16095b150867b2191151ca8a9be
+
+[ Upstream commit 19fc8557f2323c52b26561651ed4d51fc688a740 ]
+
+Before evaluating the lazy-preempt state it must be ensure that the
+preempt-count is zero.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+---
+ arch/x86/include/asm/preempt.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h
+index f66708779274..afa0e42ccdd1 100644
+--- a/arch/x86/include/asm/preempt.h
++++ b/arch/x86/include/asm/preempt.h
+@@ -96,6 +96,8 @@ static __always_inline bool __preempt_count_dec_and_test(void)
+ if (____preempt_count_dec_and_test())
+ return true;
+ #ifdef CONFIG_PREEMPT_LAZY
++ if (preempt_count())
++ return false;
+ if (current_thread_info()->preempt_lazy_count)
+ return false;
+ return test_thread_flag(TIF_NEED_RESCHED_LAZY);