diff options
-rw-r--r-- | mm/nommu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 5d8ae086f74e..1d32fe89d57b 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -105,7 +105,11 @@ unsigned int kobjsize(const void *objp) | |||
105 | { | 105 | { |
106 | struct page *page; | 106 | struct page *page; |
107 | 107 | ||
108 | if (!objp || !((page = virt_to_page(objp)))) | 108 | /* |
109 | * If the object we have should not have ksize performed on it, | ||
110 | * return size of 0 | ||
111 | */ | ||
112 | if (!objp || (unsigned long)objp >= memory_end || !((page = virt_to_page(objp)))) | ||
109 | return 0; | 113 | return 0; |
110 | 114 | ||
111 | if (PageSlab(page)) | 115 | if (PageSlab(page)) |