diff options
author | Alex Elder <elder@inktank.com> | 2012-10-02 10:25:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-26 11:38:44 -0800 |
commit | b7d68a7434bbfd57049927ca713d57e44e0eee04 (patch) | |
tree | 4702224d3ad7107d2bcc3de46d7dd6cb16d035b9 /arch/avr32/kernel/ptrace.c | |
parent | dfae3b3451c6da14df1fa62d76c8a4345d21bdb2 (diff) |
ceph: avoid 32-bit page index overflow
(cherry picked from commit 6285bc231277419255f3498d3eb5ddc9f8e7fe79)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/avr32/kernel/ptrace.c')
0 files changed, 0 insertions, 0 deletions