hrtimer: more hrtimer_init_sleeper() fallout.
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 13 Feb 2008 14:45:36 +0000 (15:45 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 13 Feb 2008 14:45:36 +0000 (15:45 +0100)
Missed an instance...

  futex_lock_pi()
    hrtimer_init_sleeper()
    rt_mutex_timed_lock()
      rt_mutex_timed_fastlock()
        rt_mutex_slowlock()
          hrtimer_start()

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

index 0deef71ff8d2a7444f74af1904b11b93e2a86766..6522ae5b14a2ad7aca5cde919c3a5f1d305c6fd6 100644 (file)
@@ -630,9 +630,12 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
        set_current_state(state);
 
        /* Setup the timer, when timeout != NULL */
-       if (unlikely(timeout))
+       if (unlikely(timeout)) {
                hrtimer_start(&timeout->timer, timeout->timer.expires,
                              HRTIMER_MODE_ABS);
+               if (!hrtimer_active(&timeout->timer))
+                       timeout->task = NULL;
+       }
 
        for (;;) {
                /* Try to acquire the lock: */