Re: [BUG 2.6.24-rc3-git6] SLUB's ksize() fails for size > 2048.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vegard,

On 12/2/07, Vegard Nossum <[email protected]> wrote:
> diff --git a/mm/slub.c b/mm/slub.c
> index 9acb413..b9f37cb 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2558,8 +2558,12 @@ size_t ksize(const void *object)
>         if (unlikely(object == ZERO_SIZE_PTR))
>                 return 0;
>
> -       page = get_object_page(object);
> +       page = virt_to_head_page(object);
>         BUG_ON(!page);
> +
> +       if (unlikely(!PageSlab(page)))
> +               return PAGE_SIZE << compound_order(page);
> +
>         s = page->slab;
>         BUG_ON(!s);

Looks good to me.

Reviewed-by: Pekka Enberg <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux