mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
Prevent race condition by using msleep() instead of mtx_unlock()/tsleep().
Reviewed by: alfred
This commit is contained in:
parent
4609c9b8e7
commit
71d8277b51
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74803
@ -625,8 +625,7 @@ debug_vn_lock(vp, flags, p, filename, line)
|
||||
mtx_lock(&vp->v_interlock);
|
||||
if ((vp->v_flag & VXLOCK) && vp->v_vxproc != curproc) {
|
||||
vp->v_flag |= VXWANT;
|
||||
mtx_unlock(&vp->v_interlock);
|
||||
tsleep((caddr_t)vp, PINOD, "vn_lock", 0);
|
||||
msleep(vp, &vp->v_interlock, PINOD, "vn_lock", 0);
|
||||
error = ENOENT;
|
||||
} else {
|
||||
if (vp->v_vxproc != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user