Commit 479ef592 authored by Oleg Drokin's avatar Oleg Drokin Committed by Linus Torvalds

[PATCH] 32bit integer overflow in invalidate_inode_pages2()

Fix a 32 bit integer overflow in invalidate_inode_pages2_range.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 02b70682
...@@ -282,8 +282,8 @@ int invalidate_inode_pages2_range(struct address_space *mapping, ...@@ -282,8 +282,8 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
* Zap the rest of the file in one hit. * Zap the rest of the file in one hit.
*/ */
unmap_mapping_range(mapping, unmap_mapping_range(mapping,
page_index << PAGE_CACHE_SHIFT, (loff_t)page_index<<PAGE_CACHE_SHIFT,
(end - page_index + 1) (loff_t)(end - page_index + 1)
<< PAGE_CACHE_SHIFT, << PAGE_CACHE_SHIFT,
0); 0);
did_range_unmap = 1; did_range_unmap = 1;
...@@ -292,7 +292,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping, ...@@ -292,7 +292,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
* Just zap this page * Just zap this page
*/ */
unmap_mapping_range(mapping, unmap_mapping_range(mapping,
page_index << PAGE_CACHE_SHIFT, (loff_t)page_index<<PAGE_CACHE_SHIFT,
PAGE_CACHE_SIZE, 0); PAGE_CACHE_SIZE, 0);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment