summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 4adbd05..a229720 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: imgact_aout.c,v 1.33 1997/02/22 09:38:55 peter Exp $
*/
#include "opt_rlimit.h"
@@ -55,7 +55,7 @@ exec_aout_imgact(imgp)
struct image_params *imgp;
{
const struct exec *a_out = (const struct exec *) imgp->image_header;
- struct vmspace *vmspace = imgp->proc->p_vmspace;
+ struct vmspace *vmspace;
vm_offset_t vmaddr;
unsigned long virtual_offset;
unsigned long file_offset;
@@ -147,6 +147,11 @@ exec_aout_imgact(imgp)
exec_new_vmspace(imgp);
/*
+ * The vm space can be changed by exec_new_vmspace
+ */
+ vmspace = imgp->proc->p_vmspace;
+
+ /*
* Map text/data read/execute
*/
vmaddr = virtual_offset;
OpenPOWER on IntegriCloud