buggy GFP_KERNEL allocators

Rik van Riel riel en nl.linux.org
Sab Ene 29 09:22:06 CST 2000


On Fri, 28 Jan 2000, Andrea Arcangeli wrote:

> --- 2.2.15pre4/mm/page_alloc.c.~1~	Tue Jan 25 15:40:06 2000
> +++ 2.2.15pre4/mm/page_alloc.c	Fri Jan 28 10:29:15 2000
> @@ -242,6 +242,7 @@
>  	 * waiting for us we need to allow it to run a bit.
>  	 */
>  	if (gfp_mask & __GFP_WAIT) {
> +		current->state = TASK_RUNNING;
>  		current->policy |= SCHED_YIELD;
>  		schedule();
>  	}

This won't work. I've seen TASK_UNINTERRUPTIBLE and TASK_ZOMBIE
tasks trying to allocate memory. You don't want to change the
state of one of these processes to TASK_RUNNING...

(that could mess up the calling code in a horrible way)

regards,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.


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



Más información sobre la lista de distribución Ayuda