Commit 6c5a7d50 authored by Sebastian Siewior's avatar Sebastian Siewior Committed by Linus Torvalds

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: default avatarSebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0042a1f7
...@@ -103,6 +103,7 @@ ret_from_signal: ...@@ -103,6 +103,7 @@ ret_from_signal:
addql #4,%sp addql #4,%sp
ret_from_exception: ret_from_exception:
move #0x2700,%sr /* disable intrs */
btst #5,%sp@(PT_SR) /* check if returning to kernel */ btst #5,%sp@(PT_SR) /* check if returning to kernel */
jeq Luser_return /* if so, skip resched, signals */ jeq Luser_return /* if so, skip resched, signals */
...@@ -156,6 +157,7 @@ Lreturn: ...@@ -156,6 +157,7 @@ Lreturn:
Lwork_to_do: Lwork_to_do:
movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */
move #0x2000,%sr /* enable intrs again */
btst #TIF_NEED_RESCHED,%d1 btst #TIF_NEED_RESCHED,%d1
jne reschedule jne reschedule
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment