mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-29 12:03:03 +00:00
Fix a LOR between allprison_lock and vnode locks by releasing
allprison_lock before releasing a prison's root vnode. PR: kern/138004 Reviewed by: kib Approved by: bz (mentor) MFC after: 3 days
This commit is contained in:
parent
d1321a41a5
commit
c4884ffa6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196592
@ -2453,7 +2453,7 @@ prison_deref(struct prison *pr, int flags)
|
||||
ppr = pr->pr_parent;
|
||||
for (tpr = ppr; tpr != NULL; tpr = tpr->pr_parent)
|
||||
tpr->pr_childcount--;
|
||||
sx_downgrade(&allprison_lock);
|
||||
sx_xunlock(&allprison_lock);
|
||||
|
||||
#ifdef VIMAGE
|
||||
if (pr->pr_vnet != ppr->pr_vnet)
|
||||
@ -2479,7 +2479,7 @@ prison_deref(struct prison *pr, int flags)
|
||||
/* Removing a prison frees a reference on its parent. */
|
||||
pr = ppr;
|
||||
mtx_lock(&pr->pr_mtx);
|
||||
flags = PD_DEREF | PD_LIST_SLOCKED;
|
||||
flags = PD_DEREF;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user