diff options
| author | Alex Elder <[email protected]> | 2012-10-02 15:25:51 +0000 |
|---|---|---|
| committer | Alex Elder <[email protected]> | 2012-10-03 15:51:18 +0000 |
| commit | 6285bc231277419255f3498d3eb5ddc9f8e7fe79 (patch) | |
| tree | cfed533859b1e07896aea7d199716ef4d2704ad4 /security/selinux/netnode.c | |
| parent | ceph: return EIO on invalid layout on GET_DATALOC ioctl (diff) | |
| download | kernel-6285bc231277419255f3498d3eb5ddc9f8e7fe79.tar.gz kernel-6285bc231277419255f3498d3eb5ddc9f8e7fe79.zip | |
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 <[email protected]>
Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
Diffstat (limited to 'security/selinux/netnode.c')
0 files changed, 0 insertions, 0 deletions
