Commit 476ced36 authored by Thomas Gleixner's avatar Thomas Gleixner

Merge branch 'rt/head' into rt/2.6.31

parents 7947db18 a03d1035
...@@ -1677,17 +1677,8 @@ out: ...@@ -1677,17 +1677,8 @@ out:
static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q,
struct hrtimer_sleeper *timeout) struct hrtimer_sleeper *timeout)
{ {
queue_me(q, hb);
/*
* There might have been scheduling since the queue_me(), as we
* cannot hold a spinlock across the get_user() in case it
* faults, and we cannot just set TASK_INTERRUPTIBLE state when
* queueing ourselves into the futex hash. This code thus has to
* rely on the futex_wake() code removing us from hash when it
* wakes us up.
*/
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
queue_me(q, hb);
/* Arm the timer */ /* Arm the timer */
if (timeout) { if (timeout) {
...@@ -1697,8 +1688,8 @@ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, ...@@ -1697,8 +1688,8 @@ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q,
} }
/* /*
* !plist_node_empty() is safe here without any lock. * If we have been removed from the hash list, then another task
* q.lock_ptr != 0 is not safe, because of ordering against wakeup. * has tried to wake us, and we can skip the call to schedule().
*/ */
if (likely(!plist_node_empty(&q->list))) { if (likely(!plist_node_empty(&q->list))) {
/* /*
......
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