Messages in this thread Patch in this message | | | Date | Tue, 9 Sep 2003 13:19:13 +0200 (CEST) | From | Bernhard Rosenkraenzer <> | Subject | [PATCH 2.6.0-test5-mm1] Fix build with debug disabled |
| |
2.6.0-test5-mm1 mm/slab.c defines dbg_redzone1 and friends in #if DEBUG, but uses them unconditionally.
Patch attached.
-- Ark Linux - Linux for the masses http://www.arklinux.org/
Redistribution and processing of this message is subject to http://www.arklinux.org/terms.php--- linux-2.6.0-test5/mm/slab.c.ark 2003-09-09 13:32:08.000000000 +0200 +++ linux-2.6.0-test5/mm/slab.c 2003-09-09 13:33:30.000000000 +0200 @@ -948,6 +948,7 @@ check_poison_obj(cachep, objp); #endif } +#if DEBUG if (cachep->flags & SLAB_RED_ZONE) { if (*dbg_redzone1(cachep, objp) != RED_INACTIVE) slab_error(cachep, "start of a freed object " @@ -956,6 +957,7 @@ slab_error(cachep, "end of a freed object " "was overwritten"); } +#endif if (cachep->dtor && !(cachep->flags & SLAB_POISON)) (cachep->dtor)(objp+obj_dbghead(cachep), cachep, 0); } @@ -2794,11 +2796,13 @@ } else { kernel_map_pages(virt_to_page(objp), c->objsize/PAGE_SIZE, 1); +#if DEBUG if (c->flags & SLAB_RED_ZONE) printk("redzone: 0x%lx/0x%lx.\n", *dbg_redzone1(c, objp), *dbg_redzone2(c, objp)); if (c->flags & SLAB_STORE_USER) printk("Last user: %p.\n", *dbg_userword(c, objp)); +#endif } spin_unlock_irqrestore(&c->spinlock, flags); | |