diff options
author | 2008-02-23 00:23:48 +0100 | |
---|---|---|
committer | 2008-02-29 22:46:48 +0000 | |
commit | 94a3f78566ef98a48814d82892f28bb741624cb8 (patch) | |
tree | cb8e4904737c84c64129753e4148b9845b49afa1 /lib/bitmap.c | |
parent | [ARM] 4836/1: Make ATAGS_PROC depend on KEXEC (diff) | |
download | linux-dev-94a3f78566ef98a48814d82892f28bb741624cb8.tar.xz linux-dev-94a3f78566ef98a48814d82892f28bb741624cb8.zip |
[ARM] 4837/1: make __get_unaligned_*() return unsigned types
Eric Sandeen tracked an XFS on ARM corruption bug down to a function
under fs/xfs/ involving some get_unaligned() calls on u64 pointers.
As it turns out, calling ARM's get_unaligned() on a u64 pointer
pointing to the following byte sequence:
80 81 82 83 84 85 86 87
would return ffffffff83828180 (LE mode.) This turns out to be
because of implicit u8 -> int promotion in ARM's implementation of
various helpers for get_unaligned(), causing them to accidentally
return signed instead of unsigned values, which in turn caused the
subsequent casts to unsigned long long in __get_unaligned_8_[bl]e()
to sign-extend the lower words.
Fix by casting the return values of __get_unaligned_[24]_[bl]e()
to unsigned int.
Cc: Eric Sandeen <sandeen@sandeen.net>
Cc: Rabeeh Khoury <rabeeh@marvell.com>
Cc: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions