Re: RT scheduling and a way to make a process hang, unkillable
From: Dhaval Giani
Date: Tue Feb 17 2009 - 00:01:19 EST
On Mon, Feb 16, 2009 at 11:18:36AM -0800, Corey Hickey wrote:
> Dhaval Giani wrote:
> > And it continues on! Please try this version.
> >
> > sched: Don't allow setuid to succeed if the user does not have rt bandwidth
> >
> > 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.
> >
> > Disclaimer: Not sure about the return values, and if setuid allows
> > return values other than EPERM and EAGAIN.
> >
> > Changes from v3:
> > 1. Actually fix the leak.
> >
> > Changes from v2:
> > 1. Patch compiles for CONFIG_CGROUP_SCHED as well
> > 2. Fix two memory leaks.
> >
> > Changes from v1:
> > 1. Peter suggested that rt_task_can_change_user should be renamed to
> > task_can_change_user
> > 2. Changed sched_rt_can_attach to boolean.
> >
> > Signed-off-by: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx>
>
> Thank you, Peter and Dhaval, for looking at this. I appreciate your work.
>
> I tested patch v4 on 2.6.29-rc5, and I get frequent kernel BUG messages.
> Should I be testing your patch on a different source tree? The patch
> applied to rc5 ok but with lots of offsets.
>
This was on top of tip I think. But yeah, that would be expected.
Yesterday was really not working out, I figured out this one, and had
fixed this in the next version. I have a better patch arond here.
thanks,
--
regards,
Dhaval
--
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/