diff options
author | peter <peter@FreeBSD.org> | 2001-12-13 23:46:01 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-12-13 23:46:01 +0000 |
commit | a194c4400184a010d8a5bf8c6196b5072c814c22 (patch) | |
tree | 2c16a1c337cbb130e3e27207e584eb4570e00917 | |
parent | 91e55e40ce426978db952fe0bc2bf5eaaadffcb1 (diff) | |
download | FreeBSD-src-a194c4400184a010d8a5bf8c6196b5072c814c22.zip FreeBSD-src-a194c4400184a010d8a5bf8c6196b5072c814c22.tar.gz |
If we were called to allocate a vnode that is not associated with a
mount point, do not dereference the NULL mp argument.
-rw-r--r-- | sys/kern/vfs_subr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ae89f86..14c2bdc 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -539,6 +539,8 @@ vlrureclaim(struct mount *mp, int count) { struct vnode *vp; + if (mp == NULL) + return; mtx_lock(&mntvnode_mtx); while (count && (vp = TAILQ_FIRST(&mp->mnt_nvnodelist)) != NULL) { TAILQ_REMOVE(&mp->mnt_nvnodelist, vp, v_nmntvnodes); |