diff options
author | Christoph Lameter <clameter@engr.sgi.com> | 2005-10-29 18:15:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-29 21:40:36 -0700 |
commit | 09ad4bbc3a5c93316d7f4ffc0c310d9cbb28c2f0 (patch) | |
tree | b98d5390ceef3dcb8d1fe83b1ef7ffe0106d4c94 | |
parent | c340010e4bf824d969a89fa192ecc7a526c0cd24 (diff) | |
download | linux-3.10-09ad4bbc3a5c93316d7f4ffc0c310d9cbb28c2f0.tar.gz linux-3.10-09ad4bbc3a5c93316d7f4ffc0c310d9cbb28c2f0.tar.bz2 linux-3.10-09ad4bbc3a5c93316d7f4ffc0c310d9cbb28c2f0.zip |
[PATCH] slab: add additional debugging to detect slabs from the wrong node
This patch adds some stack dumps if the slab logic is processing slab
blocks from the wrong node. This is necessary in order to detect
situations as encountered by Petr.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | mm/slab.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c index d30423f167a..22bfb0b2ac8 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -2419,6 +2419,7 @@ retry: 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); |