mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bernhard Rosenkraenzer <bero@arklinux.org>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: [PATCH 2.6.0-test5-mm1] Fix build with debug disabled
Date: Tue, 9 Sep 2003 13:19:13 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.56.0309091317320.9188@dot.kde.org> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 279 bytes --]

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

[-- Attachment #2: Fix compile --]
[-- Type: TEXT/PLAIN, Size: 1018 bytes --]

--- 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);
 

             reply	other threads:[~2003-09-09 11:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-09 11:19 Bernhard Rosenkraenzer [this message]
2003-09-09 12:03 ` Maciej Soltysiak
2003-09-09 12:07   ` Maciej Soltysiak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.56.0309091317320.9188@dot.kde.org \
    --to=bero@arklinux.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®