[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200805010217.m412HnlZ004149@goober>
Date: Thu, 1 May 2008 12:17:49 +1000
From: Greg Ungerer <gerg@...pgear.com>
To: torvalds@...ux-foundation.org
Cc: akpm@...ux-foundation.org, gerg@...inux.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] m68knommu: fix compare race in sched related code
From: Sebastian Siewior <bigeasy@...utronix.de>
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 <bigeasy@...utronix.de>
Signed-off-by: Greg Ungerer <gerg@...inux.org>
---
diff -Naurp linux-2.6.25/arch/m68knommu/platform/coldfire/entry.S linux-2.6.25-uc0/arch/m68knommu/platform/coldfire/entry.S
--- linux-2.6.25/arch/m68knommu/platform/coldfire/entry.S 2008-04-17 12:49:44.000000000 +1000
+++ linux-2.6.25-uc0/arch/m68knommu/platform/coldfire/entry.S 2008-04-29 14:26:11.000000000 +1000
@@ -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 */
@@ -140,6 +141,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists