svn commit: r286844 - head/sys/compat/cloudabi

Ed Schouten ed at FreeBSD.org
Mon Aug 17 13:07:13 UTC 2015


Author: ed
Date: Mon Aug 17 13:07:12 2015
New Revision: 286844
URL: https://svnweb.freebsd.org/changeset/base/286844

Log:
  Don't forget to invoke pre_execve() and post_execve().
  
  CloudABI's proc_exec() was implemented before r282708 introduced
  pre_execve() and post_execve(). Sync up by adding these missing calls.

Modified:
  head/sys/compat/cloudabi/cloudabi_proc.c

Modified: head/sys/compat/cloudabi/cloudabi_proc.c
==============================================================================
--- head/sys/compat/cloudabi/cloudabi_proc.c	Mon Aug 17 12:51:46 2015	(r286843)
+++ head/sys/compat/cloudabi/cloudabi_proc.c	Mon Aug 17 13:07:12 2015	(r286844)
@@ -46,14 +46,19 @@ cloudabi_sys_proc_exec(struct thread *td
     struct cloudabi_sys_proc_exec_args *uap)
 {
 	struct image_args args;
+	struct vmspace *oldvmspace;
 	int error;
 
+	error = pre_execve(td, &oldvmspace);
+	if (error != 0)
+		return (error);
 	error = exec_copyin_data_fds(td, &args, uap->data, uap->datalen,
 	    uap->fds, uap->fdslen);
 	if (error == 0) {
 		args.fd = uap->fd;
 		error = kern_execve(td, &args, NULL);
 	}
+	post_execve(td, error, oldvmspace);
 	return (error);
 }
 


More information about the svn-src-head mailing list