There was a mountlist race in getnewvnode() whereby the system could block
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 10 Jul 2004 16:29:45 +0000 (16:29 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 10 Jul 2004 16:29:45 +0000 (16:29 +0000)
commitda6efd2c77e4ffe406a8f9e6ad3c2c500e275240
treef83cd1e3c83be44c732124c6bd19cc7a8c854b4c
parent3c89d513b01da5c27d5d6734732ca55393a98638
There was a mountlist race in getnewvnode() whereby the system could block
obtaining the mountlist token while adding a vnode to the mountlist prior
to initializing the vnode's v_usecount and v_data fields.  This bug is
possibly responsible for or related to occassional reports of duplicate
inodes in the system.

Fix the potential problem by more completely initializing the vnode prior
to adding it to the mountlist.  Note that FreeBSD-5 also rearranged thei
r code along the same lines (though this change is independant of their
work).
sys/kern/vfs_subr.c