Re: [PATCH] sched: Don't allow setuid to succeed if the user doesnot have rt bandwidth

From: Ingo Molnar
Date: Fri Feb 27 2009 - 05:25:42 EST



* Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx> wrote:

>
> Corey Hickey reported that on using setuid to change the uid of a
> rt process, the process would be unkillable and not be running.
> This is because there was no rt runtime for that user group. Add
> in a check to see if a user can attach an rt task to its task group.
> On failure, return EINVAL, which is also returned in
> CONFIG_CGROUP_SCHED.
>
> Signed-off-by: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx>
> Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> ---
> include/linux/sched.h | 4 ++++
> kernel/sched.c | 13 +++++++++++--
> kernel/sys.c | 31 ++++++++++++++++++++-----------
> kernel/user.c | 18 ++++++++++++++++++
> 4 files changed, 53 insertions(+), 13 deletions(-)

Applied to tip:sched/urgent, thanks Dhaval!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/