• Thomas Gleixner's avatar
    [PATCH] sched: fix preemption race (Core/i386) · b268264c
    Thomas Gleixner authored
    The idle-thread-preemption-fix.patch introduced a race, which is not
    critical, but might give us an extra turn through the scheduler.  When
    interrupts are reenabled in entry.c and an interrupt occures before we
    reach the add_preempt_schedule() in preempt_schedule we get rescheduled
    again in the return from interrupt path.
    
    The patch prevents this by leaving interrupts disabled and calling a a
    seperate function preempt_schedule_irq().
    
    This split adds different plausibility checks for irq context calls and
    kernel calls.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    b268264c
sched.c 125 KB