kernel - Fix dangling ref on fifo vnode
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 21 Aug 2019 17:17:50 +0000 (10:17 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 21 Aug 2019 17:17:50 +0000 (10:17 -0700)
commitf9ad1101b0562c99b91008bf7012745e86f230c0
tree89e71c6274516dcb3cd6669bfc6c7368e918f70b
parentf70430d0e321043abdf733b90d80d93d06155acf
kernel - Fix dangling ref on fifo vnode

* Fix dangling refs on the fifo vnode which prevent unmount from
  succeeding.

* Fix open/close races which can occur during fifo open and close
  due to blocking conditions.  Use a lockmgr lock instead.

* Retain use of vp->v_token to help interlock read, write, and
  ioctl operations.

* This situation occurs when a filesystem fifo (aka via mkfifo)
  blocks on open() and is then interrupted.
sys/vfs/fifofs/fifo_vnops.c