Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146506791
D2731.id5944.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D2731.id5944.diff
View Options
Index: sys/kern/imgact_elf.c
===================================================================
--- sys/kern/imgact_elf.c
+++ sys/kern/imgact_elf.c
@@ -901,12 +901,25 @@
* not actually fault in all the segments pages.
*/
PROC_LOCK(imgp->proc);
- if (data_size > lim_cur(imgp->proc, RLIMIT_DATA) ||
- text_size > maxtsiz ||
- total_size > lim_cur(imgp->proc, RLIMIT_VMEM) ||
- racct_set(imgp->proc, RACCT_DATA, data_size) != 0 ||
- racct_set(imgp->proc, RACCT_VMEM, total_size) != 0) {
+ if (data_size > lim_cur(imgp->proc, RLIMIT_DATA)) {
PROC_UNLOCK(imgp->proc);
+ uprintf("Data segment size exceeds process limit\n");
+ return (ENOMEM);
+ } else if (text_size > maxtsiz) {
+ PROC_UNLOCK(imgp->proc);
+ uprintf("Text segment size exceeds system limit\n");
+ return (ENOMEM);
+ } else if (total_size > lim_cur(imgp->proc, RLIMIT_VMEM)) {
+ PROC_UNLOCK(imgp->proc);
+ uprintf("Total segment size exceeds process limit\n");
+ return (ENOMEM);
+ } else if (racct_set(imgp->proc, RACCT_DATA, data_size) != 0) {
+ PROC_UNLOCK(imgp->proc);
+ uprintf("Data segment size exceeds resource limit\n");
+ return (ENOMEM);
+ } else if (racct_set(imgp->proc, RACCT_VMEM, total_size) != 0) {
+ PROC_UNLOCK(imgp->proc);
+ uprintf("Total segment size exceeds resource limit\n");
return (ENOMEM);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 4, 5:44 AM (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29229995
Default Alt Text
D2731.id5944.diff (1 KB)
Attached To
Mode
D2731: Report error to user if image activator fails with ENOMEM
Attached
Detach File
Event Timeline
Log In to Comment