HAMMER VFS - Fix two ip->vp inode/vnode races
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 25 Sep 2010 14:58:12 +0000 (07:58 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 25 Sep 2010 14:58:12 +0000 (07:58 -0700)
commit036ea0c3142400d6417e92fe874773752d683044
tree2daddb7ce59dc9116aca27c73ab51931b01f8953
parent0fae822ef3ce569b1578568bee52e46bea526853
HAMMER VFS - Fix two ip->vp inode/vnode races

* nrename and nremove attempt to dereference ip->vp.  Because ip->vp has
  no other references in these code paths the operation can race and
  either assert or panic on a null-pointer dereference.

  Fix by formally acquiring the vnode before trying to dereference it.

* All other cases are passed a referenced vnode or properly acquire it
  (e.g. nresolve), and did not have this issue.
sys/vfs/hammer/hammer_vnops.c