Re: [PATCH] add PF_MEMALLOC to __alloc_pages()

From: Zlatko Calusic (zlatko@iskon.hr)
Date: Wed Jan 03 2001 - 18:03:13 EST


Rik van Riel <riel@conectiva.com.br> writes:

> Hi Linus, Alan, Mike,
>
> the following patch sets PF_MEMALLOC for the current task
> in __alloc_pages() to avoid infinite recursion when we try
> to free memory from __alloc_pages().
>
> Please apply the patch below, which fixes this (embarrasing)
> bug...
>
[snip]
> * free ourselves...
> */
> } else if (gfp_mask & __GFP_WAIT) {
> + current->flags |= PF_MEMALLOC;
> try_to_free_pages(gfp_mask);
> + current->flags &= ~PF_MEMALLOC;
> memory_pressure++;
> if (!order)
> goto try_again;
>

Hm, try_to_free_pages already sets the PF_MEMALLOC flag!

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



This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 21:00:16 EST