lkml.org 
[lkml]   [2009]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: RT scheduling and a way to make a process hang, unkillable
From
Date
On Mon, 2009-02-16 at 18:44 +0530, Dhaval Giani wrote:
> (This is not a good day!)

Monday strikes again ;-)

> @@ -572,6 +572,9 @@ static int set_user(struct cred *new)
> if (!new_user)
> return -EAGAIN;

So here we just allocated new_user and made sure we didn't fail that
allocation.

> + if (!task_can_switch_user(new->uid, current))
> + return -EAGAIN;

And here you bail, without freeing new_user. The idea was to do this
check before alloc_uid().

> if (atomic_read(&new_user->processes) >=
> current->signal->rlim[RLIMIT_NPROC].rlim_cur &&
> new_user != INIT_USER) {



\
 
 \ /
  Last update: 2009-02-18 12:23    [W:0.860 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site