umtx: Fix a bug in do_lock_pp()
If the lock is unowned (i.e., owner == UMUTEX_CONTESTED), we might get a
spurious failure, and in that case we need to retry the loop.
Otherwise, the calling thread can end up sleeping forever.
The same problem exists in do_set_ceiling(), which open-codes
do_lock_pp(), so fix it there too.
Reviewed by: olce
Reported by: Daniel King <dmking@adacore.com>
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D49031