diff options
author | dg <dg@FreeBSD.org> | 1995-03-19 23:27:57 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-19 23:27:57 +0000 |
commit | 23d0a8bc3cbd04cde5f857c4023c420749c3db2d (patch) | |
tree | 7156b51d33964eb577b0d5406b3f3c3ed5c53e9e | |
parent | d3370913880cb3746e3d78d3c158aa6b7608b325 (diff) | |
download | FreeBSD-src-23d0a8bc3cbd04cde5f857c4023c420749c3db2d.zip FreeBSD-src-23d0a8bc3cbd04cde5f857c4023c420749c3db2d.tar.gz |
Fixed bug introduced in the previous commit - the lock must be held until
after the call to exec_check_permissions().
-rw-r--r-- | sys/kern/kern_exec.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 72ce0be..6b6e71a 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.16 1995/03/16 18:12:30 bde Exp $ + * $Id: kern_exec.c,v 1.17 1995/03/19 23:08:12 davidg Exp $ */ #include <sys/param.h> @@ -138,15 +138,16 @@ interpret: } /* - * Lose the lock on the vnode. It isn't needed, and must not - * exist for the pagefault paging to work below. + * Check file permissions (also 'opens' file) */ - VOP_UNLOCK(vnodep); + error = exec_check_permissions(iparams); /* - * Check file permissions (also 'opens' file) + * Lose the lock on the vnode. It's no longer needed, and must not + * exist for the pagefault paging to work below. */ - error = exec_check_permissions(iparams); + VOP_UNLOCK(vnodep); + if (error) goto exec_fail_dealloc; |