diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2005-12-02 20:57:52 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-12-14 15:42:56 -0800 |
commit | 98afa67a80120871af9286786dbba19bc7517df7 (patch) | |
tree | c79b01b65e4238366d60fbe26f1b0c48bbcbf3ec | |
parent | c1493a189c8dcbd276144b958f9c4cb4bd25940c (diff) |
[PATCH] 32bit integer overflow in invalidate_inode_pages2()
Fix a 32 bit integer overflow in invalidate_inode_pages2_range.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | mm/truncate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/truncate.c b/mm/truncate.c index 60c8764bfac..0dff870c80a 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -291,8 +291,8 @@ int invalidate_inode_pages2_range(struct address_space *mapping, * Zap the rest of the file in one hit. */ unmap_mapping_range(mapping, - page_index << PAGE_CACHE_SHIFT, - (end - page_index + 1) + (loff_t)page_index<<PAGE_CACHE_SHIFT, + (loff_t)(end - page_index + 1) << PAGE_CACHE_SHIFT, 0); did_range_unmap = 1; @@ -301,7 +301,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping, * Just zap this page */ unmap_mapping_range(mapping, - page_index << PAGE_CACHE_SHIFT, + (loff_t)page_index<<PAGE_CACHE_SHIFT, PAGE_CACHE_SIZE, 0); } } |