From: Sebastian Siewior Date: Thu, 1 May 2008 02:17:49 +0000 (+1000) Subject: m68knommu: fix compare race in sched related code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6c5a7d504fb0e27aa90b96267177d434642a393d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git m68knommu: fix compare race in sched related code The interrupts must be disabled before considering the need resched bit of the task struct and they have to be disabled before calling schedule() Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds --- diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S index 1af7c1d650f..1e3c0dcbd7a 100644 --- a/arch/m68knommu/platform/coldfire/entry.S +++ b/arch/m68knommu/platform/coldfire/entry.S @@ -103,6 +103,7 @@ ret_from_signal: addql #4,%sp ret_from_exception: + move #0x2700,%sr /* disable intrs */ btst #5,%sp@(PT_SR) /* check if returning to kernel */ jeq Luser_return /* if so, skip resched, signals */ @@ -156,6 +157,7 @@ Lreturn: Lwork_to_do: movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ + move #0x2000,%sr /* enable intrs again */ btst #TIF_NEED_RESCHED,%d1 jne reschedule