Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754006AbZK0XJW (ORCPT ); Fri, 27 Nov 2009 18:09:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753640AbZK0XGF (ORCPT ); Fri, 27 Nov 2009 18:06:05 -0500 Received: from server1.wserver.cz ([82.113.45.157]:60406 "EHLO server1.wserver.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753221AbZK0XGD (ORCPT ); Fri, 27 Nov 2009 18:06:03 -0500 From: Jiri Slaby To: jirislaby@gmail.com Cc: mingo@elte.hu, nhorman@tuxdriver.com, sfr@canb.auug.org.au, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, marcin.slusarz@gmail.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, torvalds@linux-foundation.org, oleg@redhat.com, Stephen Smalley , Eric Paris , David Howells Subject: [PATCH v3 01/27] SECURITY: selinux, fix update_rlimit_cpu parameter Date: Sat, 28 Nov 2009 00:05:41 +0100 Message-Id: <1259363167-9347-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.6.5.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1240 Lines: 37 From: Jiri Slaby Don't pass rlim_cur member of RLIM_NLIMITS-1=RLIMIT_RTTIME limit to update_rlimit_cpu() in selinux_bprm_committing_creds. Use proper rlim[RLIMIT_CPU].rlim_cur instead. Signed-off-by: Jiri Slaby Acked-by: James Morris Cc: Stephen Smalley Cc: Eric Paris Cc: David Howells --- security/selinux/hooks.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index bb230d5..36d9e25 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2366,7 +2366,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm) 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); } } -- 1.6.5.3 -- 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/