Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] mm/nommu.c - return 0 from kobjsize with invalid objects | Date | Tue, 22 Apr 2008 22:35:10 +0100 |
| |
Robin Getz <rgetz@blackfin.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
| |