All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	Shiyong Li <shi-yong.li@motorola.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	David Rientjes <rientjes@google.com>
Subject: Re: "slab: Fix missing DEBUG_SLAB last user" breaks ARM
Date: Fri, 11 Feb 2011 15:35:24 +0000	[thread overview]
Message-ID: <20110211153524.GB26188@flint.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.DEB.2.00.1102110920060.12360@router.home>

On Fri, Feb 11, 2011 at 09:20:27AM -0600, Christoph Lameter wrote:
> On Fri, 11 Feb 2011, Russell King wrote:
> 
> > On Fri, Feb 11, 2011 at 09:02:45AM +0200, Pekka Enberg wrote:
> > > On Tue, Feb 8, 2011 at 5:02 PM, Christoph Lameter <cl@linux.com> wrote:
> > > > Uhh.. That first hunk in commit 5c5e3b33b7cb959a401f823707bee006caadd76e
> > > > looks wrong to me. ralign is usually a power of two and greater than
> > > > alignof(unsigned long long). The & operation will result in 0 and never
> > > > exempt any caches.
> > > >
> > > > diff --git a/mm/slab.c b/mm/slab.c
> > > > index bac0f4f..525c664 100644
> > > > --- a/mm/slab.c
> > > > +++ b/mm/slab.c
> > > > @@ -2220,8 +2220,8 @@ kmem_cache_create (const char *name, size_t size,
> > > > size_t align,
> > > >        if (ralign < align) {
> > > >                ralign = align;
> > > >        }
> > > > -       /* disable debug if necessary */
> > > > -       if (ralign > __alignof__(unsigned long long))
> > > > +       /* disable debug if not aligning with REDZONE_ALIGN */
> > > > +       if (ralign & (__alignof__(unsigned long long) - 1))
> > > >                flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
> > > >        /*
> > > >         * 4) Store it.
> > > >
> > > >
> > > > Did you mean
> > > >
> > > >        if (ralign > REDZONE_ALIGN) ...
> > > >
> > > > ?
> > >
> > > Ping. Any arm-capable tester out there that can verify this fix? OTOH,
> > > since Shiyong Li hasn't showed up, I'm inclined to just revert the
> > > commit...
> >
> > What fix?  The above is a quote of the patch in 5c5e3b33.
> 
> He was referring to the change of the if statement.

Replacing what with what?

	if (ralign & (__alignof__(unsigned long long) - 1))
with
	if (ralign > __alignof__(unsigned long long))
or
	if (ralign > REDZONE_ALIGN)

?  A patch is a wonderful way to describe the change to be tested.


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2011-02-11 15:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 18:06 "slab: Fix missing DEBUG_SLAB last user" breaks ARM Russell King
2011-02-08  5:44 ` Pekka Enberg
2011-02-08 12:55   ` Russell King
2011-02-08 15:02     ` Christoph Lameter
2011-02-11  7:02       ` Pekka Enberg
2011-02-11  9:14         ` Russell King
2011-02-11 15:20           ` Christoph Lameter
2011-02-11 15:35             ` Russell King [this message]
     [not found]               ` <AANLkTimDUf52xdHn22=f1J=Xn88sqPEg9P6+ceas1h1k@mail.gmail.com>
2011-02-14 15:40                 ` Russell King
2011-02-14 15:43                   ` Pekka Enberg
2011-02-14 18:07                     ` Pekka Enberg

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=20110211153524.GB26188@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=shi-yong.li@motorola.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.