[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8682.1208900110@redhat.com>
Date: Tue, 22 Apr 2008 22:35:10 +0100
From: David Howells <dhowells@...hat.com>
To: Robin Getz <rgetz@...ckfin.uclinux.org>
Cc: dhowells@...hat.com, "Greg Ungerer" <gerg@...pgear.com>,
linux-kernel@...r.kernel.org, Bryan Wu <bryan.wu@...log.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Hennerich, Michael" <Michael.Hennerich@...log.com>
Subject: Re: [PATCH] mm/nommu.c - return 0 from kobjsize with invalid objects
Robin Getz <rgetz@...ckfin.uclinux.org> wrote:
> + if (!objp || !((page = virt_to_page(objp))) || (unsigned long)objp >= memory_end)
You should probably do the additional test before calling virt_to_page(), just
in case the illegal value you've rejected would otherwise break virt_to_page()
(not very likely, but...). For valid addresses, you've got to do all the
tests anyway.
David
--
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