diff options
Diffstat (limited to 'mm/fremap.c')
-rw-r--r-- | mm/fremap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/fremap.c b/mm/fremap.c index 3235fb77c133..ab23a0673c35 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -89,6 +89,9 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
89 | size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 89 | size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
90 | if (!page->mapping || page->index >= size) | 90 | if (!page->mapping || page->index >= size) |
91 | goto err_unlock; | 91 | goto err_unlock; |
92 | err = -ENOMEM; | ||
93 | if (page_mapcount(page) > INT_MAX/2) | ||
94 | goto err_unlock; | ||
92 | 95 | ||
93 | zap_pte(mm, vma, addr, pte); | 96 | zap_pte(mm, vma, addr, pte); |
94 | 97 | ||