Re: [PATCH] mm/buddy: get the allownodes for dump at once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Jun 2012, Gavin Shan wrote:

> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 7892f84..211004e 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2765,11 +2765,19 @@ out:
>   */
>  void show_free_areas(unsigned int filter)
>  {
> -	int cpu;
> +	int nid, cpu;
> +	nodemask_t allownodes;
>  	struct zone *zone;
>  

I saw this added to the -mm tree today, but it has to be nacked with 
apologies for not seeing the patch on the mailing list earlier.

show_free_areas() is called by the oom killer, so we know two things: it 
can be called potentially very deep in the callchain and current is out of 
memory.  Both are killers for this patch since you're allocating 
nodemask_t on the stack here which could cause an overflow and because you 
can't easily fix that case with NODEMASK_ALLOC() since it allocates slab 
with GFP_KERNEL when we we're oom, which would simply suppress vital 
meminfo from being shown.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]