Messages in this thread Patch in this message | | | Date | Wed, 23 Apr 2008 23:45:17 +0300 (EEST) | From | Pekka J Enberg <> | Subject | [GIT PULL] SLUB debugging fixes for 2.6.25 |
| |
Hi Linus,
Please pull the latest SLUB git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6.git for-linus
It contains two minor fixes that improve SLUB debugging support.
Pekka
Christoph Lameter (1): slub: fix parameters passed to slab_bug()
Pekka Enberg (1): slub: improve kmem_cache_destroy() error message
mm/slub.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c index 7f8aaa2..378d3f1 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -521,7 +521,7 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) static void object_err(struct kmem_cache *s, struct page *page, u8 *object, char *reason) { - slab_bug(s, reason); + slab_bug(s, "%s", reason); print_trailer(s, page, object); } @@ -533,7 +533,7 @@ static void slab_err(struct kmem_cache *s, struct page *page, char *fmt, ...) va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); - slab_bug(s, fmt); + slab_bug(s, "%s", buf); print_page_info(page); dump_stack(); } @@ -2426,8 +2426,11 @@ void kmem_cache_destroy(struct kmem_cache *s) if (!s->refcount) { list_del(&s->list); up_write(&slub_lock); - if (kmem_cache_close(s)) - WARN_ON(1); + if (kmem_cache_close(s)) { + printk(KERN_ERR "SLUB %s: %s called for cache that " + "still has objects.\n", s->name, __func__); + dump_stack(); + } sysfs_slab_remove(s); } else up_write(&slub_lock);
| |