Skip to content

Commit

Permalink
mac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active w…
Browse files Browse the repository at this point in the history
…riters

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

MFC of r362125

Reviewed by:	stevek
  • Loading branch information
sgerraty committed Aug 29, 2020
1 parent 5fd4398 commit b1155d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/security/mac_veriexec/veriexec_fingerprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,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) {
Expand Down

0 comments on commit b1155d2

Please sign in to comment.