patch-2.3.6 linux/kernel/sys.c
Next file: linux/mm/memory.c
Previous file: linux/kernel/signal.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
Mon Jun 7 16:17:59 1999
- Orig file:
v2.3.5/linux/kernel/sys.c
- Orig date:
Fri May 14 18:55:30 1999
diff -u --recursive --new-file v2.3.5/linux/kernel/sys.c linux/kernel/sys.c
@@ -901,6 +901,8 @@
return -EINVAL;
if(copy_from_user(&new_rlim, rlim, sizeof(*rlim)))
return -EFAULT;
+ if (new_rlim.rlim_cur < 0 || new_rlim.rlim_max < 0)
+ return -EINVAL;
old_rlim = current->rlim + resource;
if (((new_rlim.rlim_cur > old_rlim->rlim_max) ||
(new_rlim.rlim_max > old_rlim->rlim_max)) &&
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)