Commit 026a9448 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] Avoid small irq preemption recursion window

This will get rid of the stack recursion possibility that can occur if
an IRQ happens to hit the IRQ return path right after we've reset
preempt_count() to 0 and are about to disable interrupts again.
Trivially fixed by just moving the preempt count update to inside the
interrupt disable.

This makes the current PREEMPT_ACTIVE method fully work for IRQ
recursions.
parent 87f882e4
......@@ -187,8 +187,8 @@ need_resched:
movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp)
sti
call schedule
movl $0,TI_preempt_count(%ebp)
cli
movl $0,TI_preempt_count(%ebp)
jmp need_resched
#endif
......
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