aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-24 06:18:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:30 -0500
commitd3561f78fd379a7110e46c87964ba7aa4120235c (patch)
tree3f055910e42abf0d2d312bf3feda79dd6798f76e /kernel/sys.c
parente0661111e5441995f7a69dc4336c9f131cb9bc58 (diff)
[PATCH] RLIMIT_CPU: document wrong return value
Document the fact that setrlimit(RLIMIT_CPU) doesn't return error codes when it should. I don't think we can fix this without a 2.7.x.. Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Ulrich Weigand <uweigand@de.ibm.com> Cc: Cliff Wickman <cpw@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 9e157e0240d4..19d058be49d4 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1656,6 +1656,13 @@ asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)
1656 1656
1657 if (resource != RLIMIT_CPU) 1657 if (resource != RLIMIT_CPU)
1658 goto out; 1658 goto out;
1659
1660 /*
1661 * RLIMIT_CPU handling. Note that the kernel fails to return an error
1662 * code if it rejected the user's attempt to set RLIMIT_CPU. This is a
1663 * very long-standing error, and fixing it now risks breakage of
1664 * applications, so we live with it
1665 */
1659 if (new_rlim.rlim_cur == RLIM_INFINITY) 1666 if (new_rlim.rlim_cur == RLIM_INFINITY)
1660 goto out; 1667 goto out;
1661 1668