hrtimer: fix recursion deadlock by re-introducing the softirq
commita6037b61c2f5fc99c57c15b26d7cfa58bbb34008
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 5 Jan 2009 10:28:22 +0000 (5 11:28 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 Jan 2009 12:14:33 +0000 (5 13:14 +0100)
treeb076de5cc8a75e4227f96dda31a0daa6e895579b
parent731a55ba0f17064f85903b7bf8e24849ec6cfa20
hrtimer: fix recursion deadlock by re-introducing the softirq

Impact: fix rare runtime deadlock

There are a few sites that do:

  spin_lock_irq(&foo)
  hrtimer_start(&bar)
    __run_hrtimer(&bar)
      func()
        spin_lock(&foo)

which obviously deadlocks. In order to avoid this, never call __run_hrtimer()
from hrtimer_start*() context, but instead defer this to softirq context.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/interrupt.h
kernel/hrtimer.c