Messages in this thread Patch in this message | | | Subject | Re: [PATCH linux-next-20110718] Fix build error at mm/slab.c . | From | Tetsuo Handa <> | Date | Thu, 21 Jul 2011 09:42:45 +0900 |
| |
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@I-love.SAKURA.ne.jp> --- 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); }
| |