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:
Simon J. Gerraty 2020-06-12 21:51:20 +00:00
parent 005ff484b9
commit 66d8bce379
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362125

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) {