Re: buggy GFP_KERNEL allocators

From: Rik van Riel (riel@nl.linux.org)
Date: Fri Jan 28 2000 - 22:06:30 EST


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@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:23 EST