diff options
author | ps <ps@FreeBSD.org> | 2001-09-26 01:24:07 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2001-09-26 01:24:07 +0000 |
commit | 6dd5e71c087c216fc2c384ce29c0501899cbaf05 (patch) | |
tree | 3bedd1b4e602672ecc08cd1ea7e310e7ac0a1eb4 /sys/kern/kern_sig.c | |
parent | ed782e909096e9685fb66fc6beb5b587b7b29f11 (diff) | |
download | FreeBSD-src-6dd5e71c087c216fc2c384ce29c0501899cbaf05.zip FreeBSD-src-6dd5e71c087c216fc2c384ce29c0501899cbaf05.tar.gz |
Lock the vnode while truncating the corefile. This fixes a panic
with softupdates dangling deps.
Submitted by: peter
MFC: ASAP :)
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 05d0c5b..c1ed0ff 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2012,8 +2012,10 @@ restart: } VATTR_NULL(&vattr); vattr.va_size = 0; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); VOP_LEASE(vp, td, cred, LEASE_WRITE); VOP_SETATTR(vp, &vattr, cred, td); + VOP_UNLOCK(vp, 0, td); PROC_LOCK(p); p->p_acflag |= ACORE; PROC_UNLOCK(p); |