OSDN Git Service

ext4: add explicit casts when masking cluster sizes
authorTheodore Ts'o <tytso@mit.edu>
Fri, 20 Dec 2013 14:29:35 +0000 (09:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:21 +0000 (12:24 -0800)
commitcd7442730bdf3c8ecdd9a0ae8d77750b359fe60e
tree637bb0cd2e0603079355f2ac2f154571cca9ebc2
parentad403b48be4d1777fdfb65966cefee9e2d8a8bcd
ext4: add explicit casts when masking cluster sizes

commit f5a44db5d2d677dfbf12deee461f85e9ec633961 upstream.

The missing casts can cause the high 64-bits of the physical blocks to
be lost.  Set up new macros which allows us to make sure the right
thing happen, even if at some point we end up supporting larger
logical block numbers.

Thanks to the Emese Revfy and the PaX security team for reporting this
issue.

Reported-by: PaX Team <pageexec@freemail.hu>
Reported-by: Emese Revfy <re.emese@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/mballoc.c