diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 15:16:02 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 15:16:02 +0900 |
commit | f34548cb735b7a80bbbb0bdd09ad4c2173ba92d5 (patch) | |
tree | e53c9e39b3149221779c10595bc59fa02de4f45f /mm/slab.c | |
parent | 76382b5bdb77c29ab430e1b82ef1c604c8dd113b (diff) | |
parent | 32b53076c31ce9159740b744d5eb5d9505312add (diff) |
Merge branch 'sh/g3-prep' into sh/for-2.6.33
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c index 3f4822938f4..7d41f15b48d 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1132,7 +1132,7 @@ static void __cpuinit cpuup_canceled(long cpu) if (nc) free_block(cachep, nc->entry, nc->avail, node); - if (!cpus_empty(*mask)) { + if (!cpumask_empty(mask)) { spin_unlock_irq(&l3->list_lock); goto free_array_cache; } @@ -2275,9 +2275,11 @@ kmem_cache_create (const char *name, size_t size, size_t align, /* * Determine if the slab management is 'on' or 'off' slab. * (bootstrapping cannot cope with offslab caches so don't do - * it too early on.) + * it too early on. Always use on-slab management when + * SLAB_NOLEAKTRACE to avoid recursive calls into kmemleak) */ - if ((size >= (PAGE_SIZE >> 3)) && !slab_early_init) + if ((size >= (PAGE_SIZE >> 3)) && !slab_early_init && + !(flags & SLAB_NOLEAKTRACE)) /* * Size is large, assume best to place the slab management obj * off-slab (should allow better packing of objs). @@ -2596,8 +2598,8 @@ static struct slab *alloc_slabmgmt(struct kmem_cache *cachep, void *objp, * kmemleak does not treat the ->s_mem pointer as a reference * to the object. Otherwise we will not report the leak. */ - kmemleak_scan_area(slabp, offsetof(struct slab, list), - sizeof(struct list_head), local_flags); + kmemleak_scan_area(&slabp->list, sizeof(struct list_head), + local_flags); if (!slabp) return NULL; } else { |