Some fixes for fdescfs lookup code.
authorkib <kib@FreeBSD.org>
Sat, 28 Feb 2015 19:57:22 +0000 (19:57 +0000)
committerkib <kib@FreeBSD.org>
Sat, 28 Feb 2015 19:57:22 +0000 (19:57 +0000)
commit661b19b40e6fab89cd0dc21aed773805a4ef4565
treeb287e4b1a40515672740e5486264bb25afec552d
parent37e48c6e3ad407eac97340303aa1a9e4cef09870
Some fixes for fdescfs lookup code.

Do not ever return doomed vnode from lookup.  This could happen, if
not checked, since dvp is relocked in the 'looking up ourselves' case.

In the other case, since dvp is relocked, mount point might go away
while fdesc_allocvp() is called.  Prevent the situation by doing
vfs_busy() before unlocking dvp.  Reuse the vn_vget_ino_gen() helper.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
sys/fs/fdescfs/fdesc_vnops.c