diff options
author | jeff <jeff@FreeBSD.org> | 2006-02-22 09:05:40 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2006-02-22 09:05:40 +0000 |
commit | 4c3ad6634a2b81b8f1b3339ddc9e2071e3bfde2e (patch) | |
tree | 0381e48fee4f23bb2a1207bdbf91bda4b520e778 /sys | |
parent | 5495fe549e8aa0d8c1708e5f6ce9a5104dd0f2c2 (diff) | |
download | FreeBSD-src-4c3ad6634a2b81b8f1b3339ddc9e2071e3bfde2e.zip FreeBSD-src-4c3ad6634a2b81b8f1b3339ddc9e2071e3bfde2e.tar.gz |
- We must hold a reference to a vnode before calling vgone() otherwise
it may not be removed from the freelist.
MFC After: 1 week
Found by: kris
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/devfs/devfs_devs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index 5b06b8c..e1c82e8 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -239,8 +239,10 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de) de->de_symlink = NULL; } if (de->de_vnode != NULL) { + vhold(de->de_vnode); de->de_vnode->v_data = NULL; vgone(de->de_vnode); + vdrop(de->de_vnode); de->de_vnode = NULL; } #ifdef MAC |