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


\
 
 \ /
  Last update: 2008-04-22 23:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site