Skip to content

Commit c403c3a

Browse files
Matthew Wilcox (Oracle)idryomov
authored andcommitted
ceph: promote to unsigned long long before shifting
On 32-bit systems, this shift will overflow for files larger than 4GB. Cc: stable@vger.kernel.org Fixes: 61f6881 ("ceph: check caps in filemap_fault and page_mkwrite") Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 7edf1ec commit c403c3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ceph/addr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ static vm_fault_t ceph_filemap_fault(struct vm_fault *vmf)
14711471
struct ceph_inode_info *ci = ceph_inode(inode);
14721472
struct ceph_file_info *fi = vma->vm_file->private_data;
14731473
struct page *pinned_page = NULL;
1474-
loff_t off = vmf->pgoff << PAGE_SHIFT;
1474+
loff_t off = (loff_t)vmf->pgoff << PAGE_SHIFT;
14751475
int want, got, err;
14761476
sigset_t oldset;
14771477
vm_fault_t ret = VM_FAULT_SIGBUS;

0 commit comments

Comments
 (0)