kernel - Fix a third missing wakeup() in kern_lock.c
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 30 Aug 2018 05:10:49 +0000 (22:10 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 30 Aug 2018 16:10:42 +0000 (09:10 -0700)
commit4f29f4c6fe268c512c02bca8febda0fd7d2c987c
tree007933c4fda17b42163ba437c992480d5ad17b9f
parent252be4c402afa5c4e35b827f272e3c52e8dbe46f
kernel - Fix a third missing wakeup() in kern_lock.c

* Fix a case where an lockmgr LK_EXCLUSIVE call with a
  timeout blocks due to existing shared locks.  If the
  timeout occurs, the exclusive lock request is backed out.

  However, if any new shared locks are attempted while
  the EXREQ was pending (due to the exclusive priority
  mechanism), those threads will block.  The backout code
  was not waking the blocked threads up for this situation.

* Fixed by issuing the wakeup() unconditionally for this
  case.  This is not a heavily traveled code path as locks
  with timeouts rarely reach the actual timeout.
sys/kern/kern_lock.c