[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.00.0909010811320.22374@tundra.namei.org>
Date: Tue, 1 Sep 2009 08:22:23 +1000 (EST)
From: James Morris <jmorris@...ei.org>
To: Jiri Slaby <jirislaby@...il.com>
cc: Andrew Morton <akpm@...ux-foundation.org>, mingo@...hat.com,
oleg@...hat.com, linux-kernel@...r.kernel.org,
Stephen Smalley <sds@...ho.nsa.gov>,
Eric Paris <eparis@...isplace.org>,
David Howells <dhowells@...hat.com>,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH 1/6] SECURITY: selinux, fix update_rlimit_cpu parameter
On Mon, 31 Aug 2009, Jiri Slaby wrote:
[added lsm list]
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index cf41988..496e626 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -2360,7 +2360,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);
This doesn't look correct to me: the original code determines
rlim->rlim_cur and then updates current to that. With your change, this
value is not used.
--
James Morris
<jmorris@...ei.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists