git: HAMMER VFS - Fix two ip->vp inode/vnode races

看板DFBSD_commit作者時間15年前 (2010/09/26 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 036ea0c3142400d6417e92fe874773752d683044 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Sat Sep 25 07:58:12 2010 -0700 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. Summary of changes: sys/vfs/hammer/hammer_vnops.c | 47 +++++++++++++++++++++++++++++++++------- 1 files changed, 38 insertions(+), 9 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/036ea0c3142400d6417e92fe874773752d683044 -- DragonFly BSD source repository
文章代碼(AID): #1CdZZp3O (DFBSD_commit)