2020-09-04 20:10:21 +00:00
|
|
|
From 43146f6ab3cb9531145aa0e3a7531b595188aeac Mon Sep 17 00:00:00 2001
|
|
|
|
Message-Id: <43146f6ab3cb9531145aa0e3a7531b595188aeac.1599166691.git.zanussi@kernel.org>
|
|
|
|
In-Reply-To: <56457dc415803c8abc5acb513ada877a79596f05.1599166690.git.zanussi@kernel.org>
|
|
|
|
References: <56457dc415803c8abc5acb513ada877a79596f05.1599166690.git.zanussi@kernel.org>
|
2019-02-27 18:51:46 +00:00
|
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Date: Mon, 18 Feb 2019 16:57:09 +0100
|
2020-09-04 20:10:21 +00:00
|
|
|
Subject: [PATCH 240/333] x86: lazy-preempt: properly check against
|
2019-04-08 23:49:20 +00:00
|
|
|
preempt-mask
|
2020-09-04 20:10:21 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.142-rt63.tar.xz
|
2019-02-27 18:51:46 +00:00
|
|
|
|
|
|
|
should_resched() should check against preempt_offset after unmasking the
|
|
|
|
need-resched-bit. Otherwise should_resched() won't work for
|
|
|
|
preempt_offset != 0 and lazy-preempt set.
|
|
|
|
|
|
|
|
Cc: stable-rt@vger.kernel.org
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
arch/x86/include/asm/preempt.h | 2 +-
|
2019-02-27 18:51:46 +00:00
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h
|
|
|
|
index 22992c837795..f66708779274 100644
|
2019-02-27 18:51:46 +00:00
|
|
|
--- a/arch/x86/include/asm/preempt.h
|
|
|
|
+++ b/arch/x86/include/asm/preempt.h
|
2019-04-08 23:49:20 +00:00
|
|
|
@@ -118,7 +118,7 @@ static __always_inline bool should_resched(int preempt_offset)
|
2019-02-27 18:51:46 +00:00
|
|
|
|
|
|
|
/* preempt count == 0 ? */
|
|
|
|
tmp &= ~PREEMPT_NEED_RESCHED;
|
|
|
|
- if (tmp)
|
|
|
|
+ if (tmp != preempt_offset)
|
|
|
|
return false;
|
|
|
|
if (current_thread_info()->preempt_lazy_count)
|
|
|
|
return false;
|
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
|
|
|
|