From 117860c9799ec0b7081e371abc66e54893cecdfd Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Sat, 29 Oct 2005 18:15:52 -0700 Subject: [PATCH] --- yaml --- r: 11325 b: refs/heads/master c: 09ad4bbc3a5c93316d7f4ffc0c310d9cbb28c2f0 h: refs/heads/master i: 11323: 765298b4dbf370b0f896b16cff2416a878be7a38 v: v3 --- [refs] | 2 +- trunk/mm/slab.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d9faa3038a41..cd8a956465f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c340010e4bf824d969a89fa192ecc7a526c0cd24 +refs/heads/master: 09ad4bbc3a5c93316d7f4ffc0c310d9cbb28c2f0 diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index d30423f167a2..22bfb0b2ac8b 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -2419,6 +2419,7 @@ static void *cache_alloc_refill(kmem_cache_t *cachep, gfp_t flags) next = slab_bufctl(slabp)[slabp->free]; #if DEBUG slab_bufctl(slabp)[slabp->free] = BUFCTL_FREE; + WARN_ON(numa_node_id() != slabp->nodeid); #endif slabp->free = next; } @@ -2633,8 +2634,10 @@ static void free_block(kmem_cache_t *cachep, void **objpp, int nr_objects, int n check_spinlock_acquired_node(cachep, node); check_slabp(cachep, slabp); - #if DEBUG + /* Verify that the slab belongs to the intended node */ + WARN_ON(slabp->nodeid != node); + if (slab_bufctl(slabp)[objnr] != BUFCTL_FREE) { printk(KERN_ERR "slab: double free detected in cache " "'%s', objp %p\n", cachep->name, objp);