mac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active writers

v_writecount can actually be < 0 for text,
so check for v_writecount > 0

Reviewed by:	stevek
MFC after:	1 week
This commit is contained in:
sjg 2020-06-12 21:51:20 +00:00
parent 48922d113c
commit d1decc9653

View File

@ -215,7 +215,7 @@ mac_veriexec_fingerprint_check_vnode(struct vnode *vp,
int error;
/* reject fingerprint if writers are active */
if (vp->v_writecount)
if (vp->v_writecount > 0)
return (ETXTBSY);
if ((vp->v_mount->mnt_flag & MNT_VERIFIED) != 0) {