Konstantin Belousov 6690381ef1 The dependency chain for priority-inheritance mutexes could be
subverted by userspace into cycle.  Both umtx_propagate_priority() and
umtx_repropagate_priority() would then loop infinitely, owning the
spinlock.

Check for the cycle using standard Floyd' algorithm before doing the
pass in the affected functions.  Add simple check for condition of
tricking the thread into a wait for itself, which could be easily
simulated by usermode without race.

Found by:	Eric van Gyzen <eric@vangyzen.net>
In collaboration with:	Eric van Gyzen <eric@vangyzen.net>
Tested by:	pho
MFC after:	1 week
2015-01-31 12:27:40 +00:00
..
2015-01-23 21:08:24 +00:00
2014-10-12 18:01:52 +00:00
2015-01-31 08:03:56 +00:00
2014-09-25 19:10:32 +00:00
2015-01-22 11:12:42 +00:00
2014-12-27 07:07:37 +00:00
2014-09-23 06:32:19 +00:00