diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-08-30 12:35:28 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-08-30 12:35:28 +0000 |
commit | 44ba0815bfeebb81c0eb237fbca4a1bfc66972d4 (patch) | |
tree | eb2a2dff20bb2275ab4dbcaf90dcfa6eab94c129 /sys/kern | |
parent | 5df9f6513be70780494106b455d8144b24a93fb3 (diff) |
Fix lock ordering problems when updating mount points, in some
cases we could end up releasing an unlocked lock.
fixes pr's 5534 and 5564, confirmed by submitters.
thanks!.
ok art@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 19706a0c923..0dd0099c80d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.141 2007/08/06 16:58:26 millert Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.142 2007/08/30 12:35:27 thib Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -158,7 +158,6 @@ sys_mount(struct proc *p, void *v, register_t *retval) vput(vp); return (error); } - VOP_UNLOCK(vp, 0, p); mp->mnt_flag |= SCARG(uap, flags) & (MNT_RELOAD | MNT_UPDATE); goto update; } @@ -269,7 +268,7 @@ update: mp->mnt_stat.f_ctime = time_second; } if (mp->mnt_flag & MNT_UPDATE) { - vrele(vp); + vput(vp); if (mp->mnt_flag & MNT_WANTRDWR) mp->mnt_flag &= ~MNT_RDONLY; mp->mnt_flag &=~ |