[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19f34abd0806101118r5edbc065t8a19b69abf9aea5c@mail.gmail.com>
Date: Tue, 10 Jun 2008 20:18:20 +0200
From: "Vegard Nossum" <vegard.nossum@...il.com>
To: "Christoph Lameter" <clameter@....com>
Cc: "Paul Mundt" <lethal@...ux-sh.org>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Pekka Enberg" <penberg@...helsinki.fi>,
"David Howells" <dhowells@...hat.com>,
LKML <linux-kernel@...r.kernel.org>, cooloney@...nel.org,
mpm@...enic.com
Subject: Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, v2.
On 6/10/08, Christoph Lameter <clameter@....com> wrote:
> On Mon, 2 Jun 2008, Paul Mundt wrote:
>
> > + page = virt_to_head_page(objp);
> > + if (!page)
> > + return 0;
>
>
> virt_to_head_page cannot return NULL. virt_to_page also does not return
> NULL. pfn_valid() needs to be used to figure out if a page is valid.
> Otherwise the page struct reference that was returned may have
> PageReserved() set to indicate that it is not a valid page.
>
Are you sure it shouldn't be virt_addr_valid()? If yes, can you please
explain the difference? Thanks :-)
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
--
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