Lock the vnode while truncating the corefile. This fixes a panic
with softupdates dangling deps. Submitted by: peter MFC: ASAP :)
This commit is contained in:
parent
9efaa0ae62
commit
88b1d98f31
@ -2012,8 +2012,10 @@ coredump(struct thread *td)
|
||||
}
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user