diff options
author | kib <kib@FreeBSD.org> | 2008-12-29 12:07:18 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-12-29 12:07:18 +0000 |
commit | c3f2d023e878a1a1fcedd705677a7a94826a7555 (patch) | |
tree | 4c6f9041488b2c93ba41bdb9c454f876445240d5 /sys/kern/kern_proc.c | |
parent | 489c6b7af54b6bdfecf46c055927d2452f709060 (diff) | |
download | FreeBSD-src-c3f2d023e878a1a1fcedd705677a7a94826a7555.zip FreeBSD-src-c3f2d023e878a1a1fcedd705677a7a94826a7555.tar.gz |
After the pfs_vncache_mutex is dropped, another thread may attempt to
do pfs_vncache_alloc() for the same pfs_node and pid. In this case, we
could end up with two vnodes for the pair. Recheck the cache under the
locked pfs_vncache_mutex after all sleeping operations are done [1].
This case mostly cannot happen now because pseudofs uses exclusive vnode
locking for lookup. But it does drop the vnode lock for dotdot lookups,
and Marcus' pseudofs_vptocnp implementation is vulnerable too.
Do not call free() on the struct pfs_vdata after insmntque() failure,
because vp->v_data points to the structure, and pseudofs_reclaim()
frees it by the call to pfs_vncache_free().
Tested by: pho [1]
Approved by: des
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/kern_proc.c')
0 files changed, 0 insertions, 0 deletions