CVSROOT:        /cvs
Module name:    src
Changes by:     b...@cvs.openbsd.org    2009/12/17 09:30:47

Modified files:
        sys/sys        : vnode.h 
        sys/nfs        : nfs_node.c 

Log message:
This fixes a case where we could panic on a null deref with a bad vnode
in nfs_inactive, on a reboot.

The core of the problem was in nfs_nget, when we lose the race to put a new
nfsnode in the tree, we have previously allocated a vnode, which getnewvnode
has done an insmntque into the nfs mp's mntlist. The problem being we then
try again with a new vnode, abandoning this one on the mntlist, leaving
junk there for us to die on when we unmount.

This introduces VLARVAL - so we can indicate in a vnode that the higher
level stuff hiding in v_data is incompletely set up. This flag is then
used by nfs to deal with a halfway set up vnode and release it correctly.

analysis and bogus fix by art@, correct fix by me after serveral failed
attempts and much painful testing by krw@, good suggestions by tedu and miod

ok krw@ oga@ thib@ blambert@ art@

Reply via email to