summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c2
-rw-r--r--sys/kern/kern_resource.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 78b4a04..811bd9f 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -908,7 +908,7 @@ exec_new_vmspace(imgp, sv)
* sense for the 32 bit binary.
*/
if (sv->sv_fixlimits != NULL)
- sv->sv_fixlimits(imgp);
+ sv->sv_fixlimits(p);
/*
* Blow away entire process VM, if address space not shared,
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index cb5b73d..397a7c5 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -655,6 +655,13 @@ kern_setrlimit(td, which, limp)
addr, addr + size, prot, FALSE);
}
}
+
+ /*
+ * The data size limit may need to be changed to a value
+ * that makes sense for the 32 bit binary.
+ */
+ if (p->p_sysent->sv_fixlimits != NULL)
+ p->p_sysent->sv_fixlimits(p);
return (0);
}
OpenPOWER on IntegriCloud