Re: + fix-possible-page_cache_shift-overflows.patch added to -mm tree
From: Andrew Morton <hidden>
Date: 2005-11-24 01:10:06
Blaisorblade [off-list ref] wrote:
On Wednesday 23 November 2005 22:22, akpm@osdl.org wrote:quoted
The patch titled fix possible PAGE_CACHE_SHIFT overflows has been added to the -mm tree. Its filename is fix-possible-page_cache_shift-overflows.patchGiven a look and the variable you're correcting s unused in that function... you can drop the hunk, I've locally queued a patch to remove the var altogether.quoted
diff -puN fs/hostfs/hostfs_kern.c~fix-possible-page_cache_shift-overflows fs/hostfs/hostfs_kern.c --- 25/fs/hostfs/hostfs_kern.c~fix-possible-page_cache_shift-overflows Wed Nov 23 13:22:12 2005 +++ 25-akpm/fs/hostfs/hostfs_kern.c Wed Nov 23 13:22:12 2005@@ -913,7 +913,7 @@ int hostfs_link_readpage(struct file *fi long long start; int err; - start = page->index << PAGE_CACHE_SHIFT; + start = (long long)page->index << PAGE_CACHE_SHIFT; buffer = kmap(page); name = inode_name(page->mapping->host, 0); if(name == NULL) return(-ENOMEM);
OK. But hostfs_commit_write() is wrong. long long start; int err = 0; start = (long long) (page->index << PAGE_CACHE_SHIFT) + from;