In do_execve(), clear imgp->textset when restarting for interpreter.

Otherwise, we might left the boolean set, which would affect cleanup
after an error on interpreter activation.

Reviewed by:	markj
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D21560
This commit is contained in:
Konstantin Belousov 2019-09-07 16:05:17 +00:00
parent 1073d17eeb
commit 1c36b72874

View File

@ -616,7 +616,9 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
* The vnode lock is held over this entire period
* so nothing should illegitimately be blocked.
*/
VOP_UNSET_TEXT_CHECKED(imgp->vp);
MPASS(imgp->textset);
VOP_UNSET_TEXT_CHECKED(newtextvp);
imgp->textset = false;
/* free name buffer and old vnode */
if (args->fname != NULL)
NDFREE(&nd, NDF_ONLY_PNBUF);