Do not assume that we own the use reference on the covered vnode until
commit22f8dd6d9be9521c5ab918b035b122b714a7c8b0
authorkib <kib@FreeBSD.org>
Wed, 15 Jun 2016 15:56:03 +0000 (15 15:56 +0000)
committerkib <kib@FreeBSD.org>
Wed, 15 Jun 2016 15:56:03 +0000 (15 15:56 +0000)
tree18006a3df006ffeade9f642c79bdedfcd10ae773
parentf3b36332afdb9ce0aef57a80298f0dc6cac7db77
Do not assume that we own the use reference on the covered vnode until
we set MNTK_UNMOUNT flag on the mp.  Otherwise parallel unmount which
wins race with us could dereference the covered vnode, and we are
left with the locked freed memory.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
sys/kern/vfs_mount.c