diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-10-20 18:21:33 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-10-20 18:21:33 +1000 |
commit | 312f5726055534be1dc9dd369be13aabd2943fcb (patch) | |
tree | 29394a3f83b4952a73b36a4aa962dfeda839e9db /mm/fremap.c | |
parent | 3d5efad953c6d5ba11d5bcb584ef8e906f953a73 (diff) | |
parent | 93918e9afc76717176e9e114e79cdbb602a45ae8 (diff) |
merge Linus head tree into my drm tree and fix up conflicts
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 3235fb77c13..ab23a0673c3 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, size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; if (!page->mapping || page->index >= size) goto err_unlock; + err = -ENOMEM; + if (page_mapcount(page) > INT_MAX/2) + goto err_unlock; zap_pte(mm, vma, addr, pte); |