[lkml]   [2008]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm/nommu.c - return 0 from kobjsize with invalid objects
Robin Getz <> 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.


 \ /
  Last update: 2008-04-22 23:39    [from the cache]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site