Re: [PATCH linux-next-20110718] Fix build error at mm/slab.c .

From: Tetsuo Handa
Date: Wed Jul 20 2011 - 20:43:00 EST


Pekka Enberg wrote:
> On Wed, 20 Jul 2011, Christoph Lameter wrote:
> > Looks okay but I thought you already had a patch that took out the #if
> > there?
>
> Indeed. Tetsuo, it's commit c225150 ("slab: fix DEBUG_SLAB build") in
> slab.git. It should appear in linux-next soon.

Ah, that commit is in linux-next-20110720, but I think it wants below one.
----------------------------------------
[PATCH] slab: fix DEBUG_SLAB warning.

In commit c225150b "slab: fix DEBUG_SLAB build",
"if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))" is always true if
ARCH_SLAB_MINALIGN == 0. Do not print warning if ARCH_SLAB_MINALIGN == 0.

Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-next.orig/mm/slab.c
+++ linux-next/mm/slab.c
@@ -3153,7 +3153,8 @@ static void *cache_alloc_debugcheck_afte
objp += obj_offset(cachep);
if (cachep->ctor && cachep->flags & SLAB_POISON)
cachep->ctor(objp);
- if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1)) {
+ if (ARCH_SLAB_MINALIGN &&
+ ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))) {
printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
objp, (int)ARCH_SLAB_MINALIGN);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/