summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.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/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-debian.tar.xz
linux-debian.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/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch')
-rw-r--r--debian/patches-rt/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/patches-rt/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch b/debian/patches-rt/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch
new file mode 100644
index 000000000..430b7295c
--- /dev/null
+++ b/debian/patches-rt/0241-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch
@@ -0,0 +1,45 @@
+From 6f0e27cbe8c66801cdad07e48be779eff3301cc1 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 26 Feb 2019 14:53:49 +0100
+Subject: [PATCH 241/347] x86: lazy-preempt: use proper return label on
+ 32bit-x86
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+The lazy-preempt uses the wrong return label in case preemption isn't
+possible. This results crash while returning to the kernel.
+
+Use the correct return label if preemption isn' possible.
+
+Reported-by: Andri Yngvason <andri@yngvason.is>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ arch/x86/entry/entry_32.S | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
+index 324b7539eaab..d8b40085c2b8 100644
+--- a/arch/x86/entry/entry_32.S
++++ b/arch/x86/entry/entry_32.S
+@@ -759,15 +759,15 @@ ENTRY(resume_kernel)
+
+ # atleast preempt count == 0 ?
+ cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count)
+- jne restore_all
++ jne restore_all_kernel
+
+ movl PER_CPU_VAR(current_task), %ebp
+ cmpl $0,TASK_TI_preempt_lazy_count(%ebp) # non-zero preempt_lazy_count ?
+- jnz restore_all
++ jnz restore_all_kernel
+
+ testl $_TIF_NEED_RESCHED_LAZY, TASK_TI_flags(%ebp)
+- jz restore_all
+- test_int_off:
++ jz restore_all_kernel
++test_int_off:
+ #endif
+ testl $X86_EFLAGS_IF, PT_EFLAGS(%esp) # interrupts off (exception path) ?
+ jz restore_all_kernel
+--
+2.36.1
+