freevnode(): lock the freeing vnode around destroy_vpollinfo()
to satisfy locking requirements of knlist manipulations. Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32761
This commit is contained in:
parent
eede22d66d
commit
d1d675cb30
@ -1896,7 +1896,9 @@ freevnode(struct vnode *vp)
|
|||||||
mac_vnode_destroy(vp);
|
mac_vnode_destroy(vp);
|
||||||
#endif
|
#endif
|
||||||
if (vp->v_pollinfo != NULL) {
|
if (vp->v_pollinfo != NULL) {
|
||||||
|
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||||
destroy_vpollinfo(vp->v_pollinfo);
|
destroy_vpollinfo(vp->v_pollinfo);
|
||||||
|
VOP_UNLOCK(vp);
|
||||||
vp->v_pollinfo = NULL;
|
vp->v_pollinfo = NULL;
|
||||||
}
|
}
|
||||||
vp->v_mountedhere = NULL;
|
vp->v_mountedhere = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user