linux/fs/ext4
Lukas Czerner 76495ec1d4 ext4: fix undefined bit shift result in ext4_fill_flex_info
The result of the bit shift expression in
'1 << sbi->s_log_groups_per_flex' can be undefined in the case that
s_log_groups_per_flex is 31 because the result of the shift is bigger
than INT_MAX. In reality this probably should not cause much problems
since we'll end up with INT_MIN which will then be converted into
'unsigned int' type, but nevertheless according to the ISO C99 the
result is actually undefined.

Fix this by changing the left operand to 'unsigned int' type.

Note that the commit d50f2ab6f0 already
tried to fix the undefined behaviour, but this was missed.

Thanks to Laszlo Ersek for pointing this out and suggesting the fix.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reported-by: Laszlo Ersek <lersek@redhat.com>
2012-10-15 12:56:49 -04:00
..
Kconfig ext4: load the crc32c driver if necessary 2012-04-29 18:27:10 -04:00
Makefile
acl.c
acl.h
balloc.c ext4: don't call ext4_error while block group is locked 2012-08-17 09:06:06 -04:00
bitmap.c ext4: don't call ext4_error while block group is locked 2012-08-17 09:06:06 -04:00
block_validity.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01:00
dir.c ext4: use core vfs llseek code for dir seeks 2012-07-23 00:00:28 +04:00
ext4.h ext4: fix metadata checksum calculation for the superblock 2012-10-10 01:06:58 -04:00
ext4_extents.h ext4: verify and calculate checksums for extent tree blocks 2012-04-29 18:37:10 -04:00
ext4_jbd2.c ext4: fix metadata checksum calculation for the superblock 2012-10-10 01:06:58 -04:00
ext4_jbd2.h ext4: remove unnecessary argument from __ext4_handle_dirty_metadata() 2012-07-22 20:37:31 -04:00
extents.c ext4: race-condition protection for ext4_convert_unwritten_extents_endio 2012-10-10 01:04:58 -04:00
file.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
fsync.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
hash.c ext4: return 32/64-bit dir name hash according to usage type 2012-03-18 22:44:40 -04:00
ialloc.c ext4: check free inode count before allocating an inode 2012-09-23 23:16:03 -04:00
indirect.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
inode.c ext4: fix mtime update in nodelalloc mode 2012-09-30 23:04:56 -04:00
ioctl.c ext4: release donor reference when EXT4_IOC_MOVE_EXT ioctl fails 2012-09-26 22:58:50 -04:00
mballoc.c ext4: enable FITRIM ioctl on bigalloc file system 2012-09-26 22:21:21 -04:00
mballoc.h ext4: remove unused macro MB_DEFAULT_MAX_GROUPS_TO_SCAN 2012-08-17 10:00:17 -04:00
migrate.c userns: Convert ext4 to user kuid/kgid where appropriate 2012-05-15 14:59:27 -07:00
mmp.c ext4: Convert to new freezing mechanism 2012-07-31 09:45:48 +04:00
move_extent.c ext4: serialize dio nonlocked reads with defrag workers 2012-09-29 00:41:21 -04:00
namei.c ext4: ext4_bread usage audit 2012-09-27 09:31:33 -04:00
page-io.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
resize.c ext4: don't call update_backups() multiple times for the same bg 2012-09-26 00:08:57 -04:00
super.c ext4: fix undefined bit shift result in ext4_fill_flex_info 2012-10-15 12:56:49 -04:00
symlink.c
truncate.h
xattr.c ext4: use s_csum_seed instead of i_csum_seed for xattr block 2012-07-09 16:29:27 -04:00
xattr.h ext4: change on-disk layout to support extended metadata checksumming 2012-04-29 18:23:10 -04:00
xattr_security.c Merge branch 'for_linus' into for_linus_merged 2012-01-10 11:54:07 -05:00
xattr_trusted.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01:00
xattr_user.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01:00