All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "Martin J. Bligh" <mbligh@mbligh.org>,
	Andrew Morton <akpm@osdl.org>,
	"Martin J. Bligh" <mbligh@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK)
Date: Mon, 30 Oct 2006 09:53:31 +0000	[thread overview]
Message-ID: <4545CB9B.2040502@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610291718481.25218@g5.osdl.org>

Linus Torvalds wrote:
> 
> On Sun, 29 Oct 2006, Martin J. Bligh wrote:
>> Seems like that doesn't fix it, I'm afraid.
> 
> Does the one in the current -git tree? It's commit 
> 5211e6e6c671f0d4b1e1a1023384d20227d8ee65, as below..
> 
> 		Linus

Submitted that commit, results in a couple of hours.

-apw

> 
> ---
> commit 5211e6e6c671f0d4b1e1a1023384d20227d8ee65
> Author: Giridhar Pemmasani <pgiri@yahoo.com>
> Date:   Sun Oct 29 04:46:55 2006 -0800
> 
>     [PATCH] Fix GFP_HIGHMEM slab panic
>     
>     As reported by Martin J. Bligh <mbligh@google.com>, we let through some
>     non-slab bits to slab allocation through __get_vm_area_node when doing a
>     vmalloc.
>     
>     I haven't been able to reproduce this, although I understand why it
>     happens: vmalloc allocates memory with
>     
>     GFP_KERNEL | __GFP_HIGHMEM
>     
>     and commit 52fd24ca1db3a741f144bbc229beefe044202cac resulted in the same
>     flags are passed down to cache_alloc_refill, causing the BUG.  The
>     following patch fixes it.
>     
>     Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with
>     GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with
>     
>     ~(__GFP_HIGHMEM | __GFP_ZERO).
>     
>     IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this
>     problem.
>     
>     Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com)
>     Cc: Martin J. Bligh <mbligh@google.com>
>     Cc: Andrew Morton <akpm@osdl.org>
>     Signed-off-by: Linus Torvalds <torvalds@osdl.org>
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 6d381df..46606c1 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -182,7 +182,7 @@ static struct vm_struct *__get_vm_area_n
>  	addr = ALIGN(start, align);
>  	size = PAGE_ALIGN(size);
>  
> -	area = kmalloc_node(sizeof(*area), gfp_mask, node);
> +	area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node);
>  	if (unlikely(!area))
>  		return NULL;
>  


WARNING: multiple messages have this Message-ID (diff)
From: Andy Whitcroft <apw@shadowen.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "Martin J. Bligh" <mbligh@mbligh.org>,
	Andrew Morton <akpm@osdl.org>,
	"Martin J. Bligh" <mbligh@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK)
Date: Mon, 30 Oct 2006 09:53:31 +0000	[thread overview]
Message-ID: <4545CB9B.2040502@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610291718481.25218@g5.osdl.org>

Linus Torvalds wrote:
> 
> On Sun, 29 Oct 2006, Martin J. Bligh wrote:
>> Seems like that doesn't fix it, I'm afraid.
> 
> Does the one in the current -git tree? It's commit 
> 5211e6e6c671f0d4b1e1a1023384d20227d8ee65, as below..
> 
> 		Linus

Submitted that commit, results in a couple of hours.

-apw

> 
> ---
> commit 5211e6e6c671f0d4b1e1a1023384d20227d8ee65
> Author: Giridhar Pemmasani <pgiri@yahoo.com>
> Date:   Sun Oct 29 04:46:55 2006 -0800
> 
>     [PATCH] Fix GFP_HIGHMEM slab panic
>     
>     As reported by Martin J. Bligh <mbligh@google.com>, we let through some
>     non-slab bits to slab allocation through __get_vm_area_node when doing a
>     vmalloc.
>     
>     I haven't been able to reproduce this, although I understand why it
>     happens: vmalloc allocates memory with
>     
>     GFP_KERNEL | __GFP_HIGHMEM
>     
>     and commit 52fd24ca1db3a741f144bbc229beefe044202cac resulted in the same
>     flags are passed down to cache_alloc_refill, causing the BUG.  The
>     following patch fixes it.
>     
>     Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with
>     GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with
>     
>     ~(__GFP_HIGHMEM | __GFP_ZERO).
>     
>     IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this
>     problem.
>     
>     Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com)
>     Cc: Martin J. Bligh <mbligh@google.com>
>     Cc: Andrew Morton <akpm@osdl.org>
>     Signed-off-by: Linus Torvalds <torvalds@osdl.org>
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 6d381df..46606c1 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -182,7 +182,7 @@ static struct vm_struct *__get_vm_area_n
>  	addr = ALIGN(start, align);
>  	size = PAGE_ALIGN(size);
>  
> -	area = kmalloc_node(sizeof(*area), gfp_mask, node);
> +	area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node);
>  	if (unlikely(!area))
>  		return NULL;
>  

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

  reply	other threads:[~2006-10-30  9:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29  5:57 Slab panic on 2.6.19-rc3-git5 (-git4 was OK) Martin J. Bligh
2006-10-29  5:57 ` Martin J. Bligh
2006-10-29  6:58 ` Pekka Enberg
2006-10-29  6:58   ` Pekka Enberg
2006-10-29 12:46   ` Giridhar Pemmasani
2006-10-29 12:46     ` Giridhar Pemmasani
2006-10-29 15:21     ` Martin J. Bligh
2006-10-29 15:21       ` Martin J. Bligh
2006-10-29 15:53       ` Giridhar Pemmasani
2006-10-29 15:53         ` Giridhar Pemmasani
2006-10-29  7:05 ` Andrew Morton
2006-10-29  7:05   ` Andrew Morton
2006-10-29  9:17   ` Nick Piggin
2006-10-29  9:17     ` Nick Piggin
2006-10-29 20:53     ` Giridhar Pemmasani
2006-10-29 20:53       ` Giridhar Pemmasani
2006-10-29 17:47   ` Andy Whitcroft
2006-10-29 17:47     ` Andy Whitcroft
2006-10-29 22:59     ` Martin J. Bligh
2006-10-29 22:59       ` Martin J. Bligh
2006-10-30  1:19       ` Linus Torvalds
2006-10-30  1:19         ` Linus Torvalds
2006-10-30  9:53         ` Andy Whitcroft [this message]
2006-10-30  9:53           ` Andy Whitcroft
2006-10-30 15:35         ` Andy Whitcroft
2006-10-30 15:35           ` Andy Whitcroft
2006-10-30 15:47           ` Pekka Enberg
2006-10-30 15:47             ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4545CB9B.2040502@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@google.com \
    --cc=mbligh@mbligh.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.