Commit 3588a085cd52ef080bf72df772378e1ba6bb292f

Authored by Peter Zijlstra
Committed by Ingo Molnar
1 parent 24e1c13c93

hrtimer: fix hrtimer_init_sleeper() users

this patch:

 commit 37bb6cb4097e29ffee970065b74499cbf10603a3
 Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
 Date:   Fri Jan 25 21:08:32 2008 +0100

     hrtimer: unlock hrtimer_wakeup

Broke hrtimer_init_sleeper() users. It forgot to fix up the futex
caller of this function to detect the failed queueing and messed up
the do_nanosleep() caller in that it could leak a TASK_INTERRUPTIBLE
state.

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

Showing 2 changed files with 4 additions and 0 deletions Side-by-side Diff

... ... @@ -1252,6 +1252,8 @@
1252 1252 t.timer.expires = *abs_time;
1253 1253  
1254 1254 hrtimer_start(&t.timer, t.timer.expires, HRTIMER_MODE_ABS);
  1255 + if (!hrtimer_active(&t.timer))
  1256 + t.task = NULL;
1255 1257  
1256 1258 /*
1257 1259 * the timer could have already expired, in which
... ... @@ -1315,6 +1315,8 @@
1315 1315  
1316 1316 } while (t->task && !signal_pending(current));
1317 1317  
  1318 + __set_current_state(TASK_RUNNING);
  1319 +
1318 1320 return t->task == NULL;
1319 1321 }
1320 1322