[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080522234036.GA18434@linux-sh.org>
Date: Fri, 23 May 2008 08:40:36 +0900
From: Paul Mundt <lethal@...ux-sh.org>
To: Pekka J Enberg <penberg@...helsinki.fi>
Cc: dhowells@...hat.com, clameter@....com, mpm@...enic.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB
On Thu, May 22, 2008 at 07:09:04PM +0300, Pekka J Enberg wrote:
> Index: slab-2.6/mm/nommu.c
> ===================================================================
> --- slab-2.6.orig/mm/nommu.c 2008-05-22 18:59:01.000000000 +0300
> +++ slab-2.6/mm/nommu.c 2008-05-22 19:00:36.000000000 +0300
> @@ -109,12 +109,22 @@
> * If the object we have should not have ksize performed on it,
> * return size of 0
> */
> - if (!objp || (unsigned long)objp >= memory_end || !((page = virt_to_page(objp))))
> + if (!objp)
> + return 0;
> +
> + if ((unsigned long) objp >= memory_end)
> + return 0;
> +
> + page = virt_to_head_page(objp);
> + if (!page)
> return 0;
>
> if (PageSlab(page))
> return ksize(objp);
>
Is ksize() happy with taking the head page instead of virt_to_page(objp)?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists