Re: [PATCH] sched: allow unsetting SCHED_RESET_ON_FORK when new policy is not realtime

Maarten Lankhorst
2012-10-17T21:41:19Z

Op 17-10-12 23:18, Maarten Lankhorst schreef:
> When implementing SIGXCPU handling for a thread boosted with rtkit to realtime
> priority, I noticed that sched_setscheduler(somepid, SCHED_OTHER) would return
> -EPERM because the thread was previously SCHED_RR | SCHED_RESET_ON_FORK,
> and looking from the code that flag cannot be reset without sufficient rights.
>
Argh must not send patches right before going to bed, this leaves open a hole
if current policy is sched_idle and when nice level is at a privileged level still..

Not that I've ever seen nice level do anything. Will resend after I've had some sleep.

~Maarten