diff options
author | Alexander Kabaev <kan@FreeBSD.org> | 2003-11-02 04:52:53 +0000 |
---|---|---|
committer | Alexander Kabaev <kan@FreeBSD.org> | 2003-11-02 04:52:53 +0000 |
commit | cb9ddc80aee7da7181eedc5be2ae7b898123f38b (patch) | |
tree | 1ebb69eabd6780710c1f611211ad591a9dcf2865 /sys/kern/vfs_default.c | |
parent | 769a3635379b0b4fb3da1658b804b8b4a14d2e96 (diff) | |
download | src-cb9ddc80aee7da7181eedc5be2ae7b898123f38b.tar.gz src-cb9ddc80aee7da7181eedc5be2ae7b898123f38b.zip |
Take care not to call vput if thread used in corresponding vget
wasn't curthread, i.e. when we receive a thread pointer to use
as a function argument. Use VOP_UNLOCK/vrele in these cases.
The only case there td != curthread known at the moment is
boot() calling sync with thread0 pointer.
This fixes the panic on shutdown people have reported.
Notes
Notes:
svn path=/head/; revision=121874
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 4e248c1a49bc..ffce8ff0adf8 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -908,7 +908,8 @@ loop: if (error) allerror = error; - vput(vp); + VOP_UNLOCK(vp, 0, td); + vrele(vp); mtx_lock(&mntvnode_mtx); } mtx_unlock(&mntvnode_mtx); |