summaryrefslogtreecommitdiff
path: root/fs/jfs/jfs_logmgr.c
diff options
context:
space:
mode:
authorNickolai Zeldovich <nickolai@csail.mit.edu>2013-01-05 23:19:21 +0400
committerDave Kleikamp <dave.kleikamp@oracle.com>2013-01-07 18:21:36 +0400
commit9d48017bce890b19e3bba649850bdbc8a6f95903 (patch)
treeece6878230600e39daafc2169afaced628cac871 /fs/jfs/jfs_logmgr.c
parent5f243b9b46a22e5790dbbc36f574c2417af49a41 (diff)
downloadlinux-9d48017bce890b19e3bba649850bdbc8a6f95903.tar.xz
jfs: avoid undefined behavior from left-shifting by 32 bits
Shifting a 32-bit int by 32 bits is undefined behavior in C, and results in different behavior on different architectures (e.g., x86 and PowerPC). diAlloc() in fs/jfs/jfs_imap.c computes a mask using 0xffffffffu<<(32-bitno), which can left-shift by 32 bits. To avoid unexpected behavior, explicitly check for bitno==0 and use a 0 mask. Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs/jfs/jfs_logmgr.c')
0 files changed, 0 insertions, 0 deletions