patch-2.0.30 linux/kernel/sys.c
Next file: linux/kernel/sysctl.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
Tue Apr 8 08:47:47 1997
- Orig file:
v2.0.29/linux/kernel/sys.c
- Orig date:
Tue Jul 16 22:16:54 1996
diff -u --recursive --new-file v2.0.29/linux/kernel/sys.c linux/kernel/sys.c
@@ -854,6 +854,8 @@
if (err)
return err;
memcpy_fromfs(&new_rlim, rlim, sizeof(*rlim));
+ 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, slshen@lbl.gov