diff options
author | kib <kib@FreeBSD.org> | 2014-07-16 14:08:01 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-07-16 14:08:01 +0000 |
commit | 4a70d74f6e621a6b19b574f9fcbd60741ace2c07 (patch) | |
tree | 013597099bfdb63216fe1a1ae722bc7e4d256166 /sys/fs | |
parent | 8708f6a5a23e0fe1dc767d550762ae9e206b0992 (diff) | |
download | FreeBSD-src-4a70d74f6e621a6b19b574f9fcbd60741ace2c07.zip FreeBSD-src-4a70d74f6e621a6b19b574f9fcbd60741ace2c07.tar.gz |
Do not ignore error from tmpfs_alloc_vp(). It results in access to
the random memory.
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index ea8bb8e..5ffab50 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -185,7 +185,9 @@ tmpfs_lookup(struct vop_cachedlookup_args *v) cnp->cn_flags |= SAVENAME; } else { error = tmpfs_alloc_vp(dvp->v_mount, tnode, - cnp->cn_lkflags, vpp); + cnp->cn_lkflags, vpp); + if (error != 0) + goto out; } } } |