From: Oleg Drokin Date: Wed, 23 Nov 2005 21:37:47 +0000 (-0800) Subject: [PATCH] 32bit integer overflow in invalidate_inode_pages2() X-Git-Tag: v2.6.15-rc3~71 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=479ef592f3664dd629417098c8599261c0f689ab;p=linux-2.6 [PATCH] 32bit integer overflow in invalidate_inode_pages2() Fix a 32 bit integer overflow in invalidate_inode_pages2_range. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/truncate.c b/mm/truncate.c index 29c18f68dc..9173ab5006 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<