Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB

David Howells
2008-05-28T13:13:13Z

Pekka J Enberg <penberg@cs.helsinki.fi> wrote:

> From: Christoph Lameter <clameter@sgi.com>
>
> As reported by Paul Mundt, kobjsize() does not work properly with SLOB and SLUB
> that re-use parts of struct page for their own purposes. Fix it up by using
> compound_order() for compound pages that don't have PageSlab set.
>
> Reported-by: Paul Mundt <lethal@linux-sh.org>
> Cc: Christoph Lameter <clameter@sgi.com>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
> I kept the original object size calculation for non-compound pages in this
> version. It looks like the nommu code uses kobjsize() for all sorts of
> interesting things.

Works for SLAB and SLUB. SLOB breaks well before getting to anything these
patches affect.

Acked-by: David Howells <dhowells@redhat.com>