Re: [patch] little improvement

Alexander Kjeldaas (astor@guardian.no)
Fri, 27 Nov 1998 15:17:52 +0100


On Fri, Nov 27, 1998 at 11:50:48AM +0100, Andrea Arcangeli wrote:
> This patch doesn' t need comments and is obviously right ;-)
>
> Index: linux/kernel/fork.c
> diff -u linux/kernel/fork.c:1.1.1.2 linux/kernel/fork.c:1.1.1.1.2.2
> --- linux/kernel/fork.c:1.1.1.2 Fri Nov 27 11:19:08 1998
> +++ linux/kernel/fork.c Fri Nov 27 11:41:40 1998
> @@ -137,7 +137,7 @@
> {
> struct task_struct **tslot = NULL;
>
> - if (!current->uid || (nr_tasks < NR_TASKS - MIN_TASKS_LEFT_FOR_ROOT))
> + if ((nr_tasks < NR_TASKS - MIN_TASKS_LEFT_FOR_ROOT) || !current->uid)
or rather:
+ if ((nr_tasks < NR_TASKS - MIN_TASKS_LEFT_FOR_ROOT) ||
capable(CAP_SYS_RESOURCE))
> tslot = get_free_taskslot();
> return tslot;
> }
>

astor

-- 
 Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway
 http://www.guardian.no/

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