MFC: rev 1.150
Calling setrlimit from 32bit apps could potentially increase certain limits beyond what should be capiable in a 32bit process, so we must fixup the limits. This is slightly different than HEAD to not change the ABI.
This commit is contained in:
parent
01364d3f00
commit
d3bd7d36e5
@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/imgact.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -654,6 +655,13 @@ kern_setrlimit(td, which, limp)
|
||||
addr, addr + size, prot, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (td->td_proc->p_sysent->sv_fixlimits != NULL) {
|
||||
struct image_params imgp;
|
||||
|
||||
imgp.proc = td->td_proc;
|
||||
td->td_proc->p_sysent->sv_fixlimits(&imgp);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user