Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH]slub: fix bad scope checking

1 view
Skip to first unread message

Zhang, Yanmin

unread,
Apr 1, 2010, 5:40:01 AM4/1/10
to
Function init_kmem_cache_nodes is incorrect when checking upper limitation
of kmalloc_caches.

The patch against latest tip/master fixes it.

From: Zhang, Yanmin <yanmin...@linux.intel.com>

---

--- linux-2.6/mm/slub.c 2010-04-01 17:01:21.091999999 +0800
+++ linux-2.6_slub/mm/slub.c 2010-04-01 17:04:34.876000010 +0800
@@ -2153,7 +2153,7 @@ static int init_kmem_cache_nodes(struct
int local_node;

if (slab_state >= UP && (s < kmalloc_caches ||
- s > kmalloc_caches + KMALLOC_CACHES))
+ s >= kmalloc_caches + KMALLOC_CACHES))
local_node = page_to_nid(virt_to_page(s));
else
local_node = 0;


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

Christoph Lameter

unread,
Apr 1, 2010, 12:10:02 PM4/1/10
to
On Thu, 1 Apr 2010, Zhang, Yanmin wrote:

> Function init_kmem_cache_nodes is incorrect when checking upper limitation
> of kmalloc_caches.

True.

Acked-by: Christoph Lameter <c...@linux-foundation.org>

Pekka Enberg

unread,
Apr 2, 2010, 3:10:02 AM4/2/10
to
Christoph Lameter wrote:
> On Thu, 1 Apr 2010, Zhang, Yanmin wrote:
>
>> Function init_kmem_cache_nodes is incorrect when checking upper limitation
>> of kmalloc_caches.
>
> True.
>
> Acked-by: Christoph Lameter <c...@linux-foundation.org>

Applied, thanks!

0 new messages