49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From afdfaa64a3ab73b35cf0f8dc9d7345eaaa61fe75 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <afdfaa64a3ab73b35cf0f8dc9d7345eaaa61fe75.1596234184.git.zanussi@kernel.org>
|
|
In-Reply-To: <378ee68279f6a7631221f2670a9298620148690d.1596234183.git.zanussi@kernel.org>
|
|
References: <378ee68279f6a7631221f2670a9298620148690d.1596234183.git.zanussi@kernel.org>
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Date: Tue, 26 Feb 2019 14:53:49 +0100
|
|
Subject: [PATCH 241/329] 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.135-rt60.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.17.1
|
|
|