Message ID | 49957F98.50708@st.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Hi Giuseppe, On Fri, Feb 13, 2009 at 4:11 PM, Giuseppe CAVALLARO <peppe.cavallaro@st.com> wrote: > @@ -2262,7 +2266,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, > Â Â Â Â Â Â Â Â ralign = align; > Â Â Â Â } > Â Â Â Â /* disable debug if necessary */ > - Â Â Â if (ralign > __alignof__(unsigned long long)) > + Â Â Â if (ralign > ARCH_SLAB_MAX_DEBUG_ALIGN) > Â Â Â Â Â Â Â Â flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); > Â Â Â Â /* > Â Â Â Â * 4) Store it. This doesn't address the issues raised by Paul at all. Pekka -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Pekka, Pekka Enberg wrote: > Hi Giuseppe, > > On Fri, Feb 13, 2009 at 4:11 PM, Giuseppe CAVALLARO > <peppe.cavallaro@st.com> wrote: > >> @@ -2262,7 +2266,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, >> ralign = align; >> } >> /* disable debug if necessary */ >> - if (ralign > __alignof__(unsigned long long)) >> + if (ralign > ARCH_SLAB_MAX_DEBUG_ALIGN) >> flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); >> /* >> * 4) Store it. >> > > This doesn't address the issues raised by Paul at all. > > Pekka > Sorry for my late reply. You are right. I'm going to review this but this could take a while. I'll go back to you as soon as possible. Regards, Peppe // -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/mm/slab.c b/mm/slab.c index 4d00855..587e0f3 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -165,6 +165,10 @@ #define ARCH_SLAB_MINALIGN 0 #endif +#ifndef ARCH_SLAB_MAX_DEBUG_ALIGN +#define ARCH_SLAB_MAX_DEBUG_ALIGN __alignof__(unsigned long long) +#endif + #ifndef ARCH_KMALLOC_FLAGS #define ARCH_KMALLOC_FLAGS SLAB_HWCACHE_ALIGN #endif @@ -2262,7 +2266,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, ralign = align; } /* disable debug if necessary */ - if (ralign > __alignof__(unsigned long long)) + if (ralign > ARCH_SLAB_MAX_DEBUG_ALIGN) flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); /* * 4) Store it.