diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/nommu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -105,7 +105,11 @@ unsigned int kobjsize(const void *objp) { struct page *page; - if (!objp || !((page = virt_to_page(objp)))) + /* + * If the object we have should not have ksize performed on it, + * return size of 0 + */ + if (!objp || (unsigned long)objp >= memory_end || !((page = virt_to_page(objp)))) return 0; if (PageSlab(page)) |