Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933380Ab0BDRWc (ORCPT ); Thu, 4 Feb 2010 12:22:32 -0500 Received: from kroah.org ([198.145.64.141]:34763 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933281Ab0BDRWA (ORCPT ); Thu, 4 Feb 2010 12:22:00 -0500 X-Mailbox-Line: From linux@linux.site Thu Feb 4 09:15:10 2010 Message-Id: <20100204171509.867208973@linux.site> User-Agent: quilt/0.47-14.9 Date: Thu, 04 Feb 2010 09:12:09 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Jiri Slaby , James Morris , Stephen Smalley , Eric Paris , David Howells , Greg Kroah-Hartman Subject: [38/74] SECURITY: selinux, fix update_rlimit_cpu parameter In-Reply-To: <20100204171850.GA16539@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1344 Lines: 43 2.6.32-stable review patch. If anyone has any objections, please let us know. ------------------ From: Jiri Slaby commit 17740d89785aeb4143770923d67c293849414710 upstream. Don't pass current RLIMIT_RTTIME to update_rlimit_cpu() in selinux_bprm_committing_creds, since update_rlimit_cpu expects RLIMIT_CPU limit. Use proper rlim[RLIMIT_CPU].rlim_cur instead to fix that. Signed-off-by: Jiri Slaby Acked-by: James Morris Cc: Stephen Smalley Cc: Eric Paris Cc: David Howells Signed-off-by: Greg Kroah-Hartman --- security/selinux/hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2366,7 +2366,7 @@ static void selinux_bprm_committing_cred initrlim = init_task.signal->rlim + i; rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur); } - update_rlimit_cpu(rlim->rlim_cur); + update_rlimit_cpu(current->signal->rlim[RLIMIT_CPU].rlim_cur); } } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/