alistair23-linux/fs/ceph
Alex Elder 6285bc2312 ceph: avoid 32-bit page index overflow
A pgoff_t is defined (by default) to have type (unsigned long).  On
architectures such as i686 that's a 32-bit type.  The ceph address
space code was attempting to produce 64 bit offsets by shifting a
page's index by PAGE_CACHE_SHIFT, but the result was not what was
desired because the shift occurred before the result got promoted
to 64 bits.

Fix this by converting all uses of page->index used in this way to
use the page_offset() macro, which ensures the 64-bit result has the
intended value.

This fixes http://tracker.newdream.net/issues/3112

Reported-by:  Mohamed Pakkeer <pakkeer.mohideen@realimage.com>
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-10-03 10:51:18 -05:00
..
addr.c ceph: avoid 32-bit page index overflow 2012-10-03 10:51:18 -05:00
caps.c ceph: convert to use le32_add_cpu() 2012-10-01 14:30:54 -05:00
ceph_frag.c
debugfs.c libceph: delay debugfs initialization until we learn global_id 2012-08-20 10:03:15 -07:00
dir.c ceph: simplify+fix atomic_open 2012-08-02 09:11:19 -07:00
export.c ceph: move encode_fh to new API 2012-05-29 23:28:33 -04:00
file.c ceph: propagate layout error on osd request creation 2012-10-01 17:20:00 -05:00
inode.c ceph: tolerate (and warn on) extraneous dentry from mds 2012-08-21 15:55:25 -07:00
ioctl.c ceph: return EIO on invalid layout on GET_DATALOC ioctl 2012-10-03 10:51:17 -05:00
ioctl.h ceph: fully initialize new layout 2012-05-16 14:28:27 -05:00
Kconfig
locks.c ceph: unwind canceled flock state 2011-06-07 21:36:45 -07:00
Makefile ceph: Makefile: Remove unnessary code 2011-01-12 15:15:13 -08:00
mds_client.c ceph: Fix oops when handling mdsmap that decreases max_mds 2012-10-01 14:30:54 -05:00
mds_client.h ceph: define ceph_auth_handshake type 2012-05-17 08:18:12 -05:00
mdsmap.c
snap.c ceph: define snap counts as u32 everywhere 2012-07-30 18:15:47 -07:00
strings.c
super.c ceph: let path portion of mount "device" be optional 2012-10-01 14:30:49 -05:00
super.h ceph: simplify+fix atomic_open 2012-08-02 09:11:19 -07:00
xattr.c ceph: fix potential double free 2012-07-30 18:15:35 -07:00