patch-2.2.10 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:18:16 1999
- Orig file:
v2.2.9/linux/kernel/sys.c
- Orig date:
Fri Nov 27 13:09:30 1998
diff -u --recursive --new-file v2.2.9/linux/kernel/sys.c linux/kernel/sys.c
@@ -900,6 +900,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)