Elad Efrat wrote:
> - if (veriexec_verify(l, handle, "(mmap)", VERIEXEC_INDIRECT,
> - NULL)) {
> + vn_lock(vp, LK_SHARED | LK_RETRY);
> + error = veriexec_verify(l, handle, "(mmap)", VERIEXEC_INDIRECT,
> NULL);
> + VOP_UNLOCK(vp);
>
Hi,
The current code confuses "lock_state" for something that it isn't. I
discussed this a while ago with hannken@ and blymn@ and came up with
the attached patch. We change the semantics to require locking and add
a KASSERT to make sure they're followed. Missing locking bits are
added in two place