kernel - Fix deadlock when umount races an access on the underlying filesystem
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 29 Jan 2013 23:04:05 +0000 (15:04 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 29 Jan 2013 23:04:05 +0000 (15:04 -0800)
commit63f86bf72020204ff34fd652a6d738e2ed7fa79e
tree1cf37ba98fa0182d98536b5e3bb140da3ba651cf
parent8aefdd25a3f794c7099ac77056d8fa74c28e7bcc
kernel - Fix deadlock when umount races an access on the underlying filesystem

* The nlookup code temporarily busies the target mount when diving a
  mount point in cases where the base of the mount is not resolved
  in the namecache.

* Fix a deadlock which can occur between the namecache structural lock
  and the vfs_busy() on the mount structure by reordering the lock.

* Generally only occured if an attempt was made to unmount a filesystem
  on which programs are still doing active operations (verses just
  passively holding references to the filesystem).  For example, a
  umount on the target filesystem occuring while a cpdup using an
  absolute path is running.

Reported-by: ftigeot
sys/kern/vfs_nlookup.c