linux/debian/patches-rt/0242-x86-lazy-preempt-use-p...

49 lines
1.7 KiB
Diff
Raw Normal View History

2020-06-23 13:42:59 +00:00
From 5fd4eedd6c9f19c50a5d7ea66edc4a07bf3ddb32 Mon Sep 17 00:00:00 2001
Message-Id: <5fd4eedd6c9f19c50a5d7ea66edc4a07bf3ddb32.1592846147.git.zanussi@kernel.org>
In-Reply-To: <07cd0dbc80b976663c80755496a03f288decfe5a.1592846146.git.zanussi@kernel.org>
References: <07cd0dbc80b976663c80755496a03f288decfe5a.1592846146.git.zanussi@kernel.org>
2019-02-27 18:51:46 +00:00
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 26 Feb 2019 14:53:49 +0100
2020-06-23 13:42:59 +00:00
Subject: [PATCH 242/330] x86: lazy-preempt: use proper return label on
2019-04-08 23:49:20 +00:00
32bit-x86
2020-06-23 13:42:59 +00:00
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.127-rt55.tar.xz
2019-02-27 18:51:46 +00:00
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>
---
2019-04-08 23:49:20 +00:00
arch/x86/entry/entry_32.S | 8 ++++----
2019-02-27 18:51:46 +00:00
1 file changed, 4 insertions(+), 4 deletions(-)
2019-04-08 23:49:20 +00:00
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
2020-06-22 13:14:16 +00:00
index 324b7539eaab..d8b40085c2b8 100644
2019-02-27 18:51:46 +00:00
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
2020-03-06 11:44:27 +00:00
@@ -759,15 +759,15 @@ ENTRY(resume_kernel)
2019-02-27 18:51:46 +00:00
# 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
2020-01-03 23:36:11 +00:00
--
2020-06-22 13:14:16 +00:00
2.17.1
2020-01-03 23:36:11 +00:00