]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
m68knommu: fix compare race in sched related code
authorSebastian Siewior <bigeasy@linutronix.de>
Thu, 1 May 2008 02:17:49 +0000 (12:17 +1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 May 2008 15:08:36 +0000 (08:08 -0700)
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@linutronix.de>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/m68knommu/platform/coldfire/entry.S

index 1af7c1d650f61f968abe7b3897a885c52dbb5e4d..1e3c0dcbd7acec7a1ac9070704d3109bd6d2980e 100644 (file)
@@ -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