diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2005-11-23 22:37:47 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-24 01:08:39 +0100 |
commit | 479ef592f3664dd629417098c8599261c0f689ab (patch) | |
tree | 616270b5c79cc3ef5f1fba683f1913f4bea74f47 /mm/truncate.c | |
parent | [PATCH] jffs2 debug gcc-2.9x fix (diff) | |
download | linux-479ef592f3664dd629417098c8599261c0f689ab.tar.xz linux-479ef592f3664dd629417098c8599261c0f689ab.zip |
[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>
Diffstat (limited to 'mm/truncate.c')
-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 29c18f68dc35..9173ab500604 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -282,8 +282,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; @@ -292,7 +292,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); } } |