|
@@ -1256,8 +1256,15 @@ retry_private:
|
|
if (!match_futex(&this->key, &key1))
|
|
if (!match_futex(&this->key, &key1))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- WARN_ON(!requeue_pi && this->rt_waiter);
|
|
|
|
- WARN_ON(requeue_pi && !this->rt_waiter);
|
|
|
|
|
|
+ /*
|
|
|
|
+ * FUTEX_WAIT_REQEUE_PI and FUTEX_CMP_REQUEUE_PI should always
|
|
|
|
+ * be paired with each other and no other futex ops.
|
|
|
|
+ */
|
|
|
|
+ if ((requeue_pi && !this->rt_waiter) ||
|
|
|
|
+ (!requeue_pi && this->rt_waiter)) {
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
/*
|
|
* Wake nr_wake waiters. For requeue_pi, if we acquired the
|
|
* Wake nr_wake waiters. For requeue_pi, if we acquired the
|