diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2005-11-23 16:37:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-23 19:08:39 -0500 |
commit | 479ef592f3664dd629417098c8599261c0f689ab (patch) | |
tree | 616270b5c79cc3ef5f1fba683f1913f4bea74f47 /mm | |
parent | 02b7068221eed702a37527fa2da4d63a27b3126a (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>
Diffstat (limited to 'mm')
-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, | |||
282 | * Zap the rest of the file in one hit. | 282 | * Zap the rest of the file in one hit. |
283 | */ | 283 | */ |
284 | unmap_mapping_range(mapping, | 284 | unmap_mapping_range(mapping, |
285 | page_index << PAGE_CACHE_SHIFT, | 285 | (loff_t)page_index<<PAGE_CACHE_SHIFT, |
286 | (end - page_index + 1) | 286 | (loff_t)(end - page_index + 1) |
287 | << PAGE_CACHE_SHIFT, | 287 | << PAGE_CACHE_SHIFT, |
288 | 0); | 288 | 0); |
289 | did_range_unmap = 1; | 289 | did_range_unmap = 1; |
@@ -292,7 +292,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping, | |||
292 | * Just zap this page | 292 | * Just zap this page |
293 | */ | 293 | */ |
294 | unmap_mapping_range(mapping, | 294 | unmap_mapping_range(mapping, |
295 | page_index << PAGE_CACHE_SHIFT, | 295 | (loff_t)page_index<<PAGE_CACHE_SHIFT, |
296 | PAGE_CACHE_SIZE, 0); | 296 | PAGE_CACHE_SIZE, 0); |
297 | } | 297 | } |
298 | } | 298 | } |