summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 8ff2dda..5b0d44f 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -842,6 +842,15 @@ exec_new_vmspace(imgp, sv)
EVENTHANDLER_INVOKE(process_exec, p);
/*
+ * Here is as good a place as any to do any resource limit cleanups.
+ * This is needed if a 64 bit binary exec's a 32 bit binary - the
+ * data size limit may need to be changed to a value that makes
+ * sense for the 32 bit binary.
+ */
+ if (sv->sv_fixlimits)
+ sv->sv_fixlimits(imgp);
+
+ /*
* Blow away entire process VM, if address space not shared,
* otherwise, create a new VM space so that other threads are
* not disrupted
OpenPOWER on IntegriCloud