Before evaluating the lazy-preempt state it must be ensure that the preempt-count is zero. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- arch/arm64/include/asm/preempt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/preempt.h b/arch/arm64/include/asm/preempt.h index 3bfad251203b5..ca1c6fe8dd347 100644 --- a/arch/arm64/include/asm/preempt.h +++ b/arch/arm64/include/asm/preempt.h @@ -73,6 +73,8 @@ static inline bool __preempt_count_dec_and_test(void) if (!pc || !READ_ONCE(ti->preempt_count)) return true; #ifdef CONFIG_PREEMPT_LAZY + if ((pc & ~PREEMPT_NEED_RESCHED)) + return false; if (current_thread_info()->preempt_lazy_count) return false; return test_thread_flag(TIF_NEED_RESCHED_LAZY); -- 2.23.0.rc1