Please send the patch to this mailing list with a full description, as per
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt. And by "full" I
mean something which tells us what a "robust futex" actually is (it's been
a year since I thought about them) and why we would want such a thing.
This code looks racy:
+static int futex_deadlock(struct rt_mutex *lock)
+{
+ DEFINE_WAIT(wait);
+
+ _raw_spin_unlock(&lock->wait_lock);
+ _raw_spin_unlock(¤t->pi_lock);
+
+ prepare_to_wait(&deadlocked_futex, &wait, TASK_INTERRUPTIBLE);
+ schedule();
+ finish_wait(&deadlocked_futex, &wait);
+
+ return -EDEADLK;
+}
If the spin_unlocks happened after the prepare_to_wait then it would be
more idoimatic, but without having analysed the wakeup path, I wonder if a
wakeup which occurs after the spin_unlocks and before the prepare_to_wait()
will get lost.