From: Andrew Morton Date: Fri, 24 Mar 2006 11:18:36 +0000 (-0800) Subject: [PATCH] RLIMIT_CPU: document wrong return value X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d3561f78fd379a7110e46c87964ba7aa4120235c;p=deliverable%2Flinux.git [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 Cc: Ulrich Weigand Cc: Cliff Wickman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) if (resource != RLIMIT_CPU) goto out; + + /* + * RLIMIT_CPU handling. Note that the kernel fails to return an error + * code if it rejected the user's attempt to set RLIMIT_CPU. This is a + * very long-standing error, and fixing it now risks breakage of + * applications, so we live with it + */ if (new_rlim.rlim_cur == RLIM_INFINITY) goto out;