Re: RT scheduling and a way to make a process hang, unkillable

From: Peter Zijlstra
Date: Sun Feb 15 2009 - 06:25:18 EST


On Sat, 2009-02-14 at 16:51 -0800, Corey Hickey wrote:
> Hello,
>
> I've encountered a bit of a problem in recent kernels that include
> "Group scheduling for SCHED_RR/FIFO": it is possible for a process run
> by root to hang itself and become unkillable--even by a 'kill -9'.
>
> The following kernel options must be set:
> CONFIG_GROUP_SCHED=y
> CONFIG_RT_GROUP_SCHED=y
> CONFIG_USER_SCHED=y
>
> The procedure is for a program to:
> 1. run as root
> 2. set SCHED_FIFO
> 3. change UID to a user with no realtime CPU share allocated

Hmm, setuid() should fail in that situation.

/me goes peek at code.

Can't find any code to make that happen, Dhaval didn't we fix that at
one point?

--
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/