]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: use atomic64_t for the per-flexbg free_clusters count
authorTheodore Ts'o <tytso@mit.edu>
Tue, 12 Mar 2013 03:39:59 +0000 (23:39 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:17:59 +0000 (12:17 -0700)
commit229cf88d53fb74a36fcc7307048666081b283f49
tree26c6d24a1fa5ffb6dcaf035b2f3ea9544417b4b2
parent5d4ec86c8f520fa7aa055b3248103281908aa499
ext4: use atomic64_t for the per-flexbg free_clusters count

commit 90ba983f6889e65a3b506b30dc606aa9d1d46cd2 upstream.

A user who was using a 8TB+ file system and with a very large flexbg
size (> 65536) could cause the atomic_t used in the struct flex_groups
to overflow.  This was detected by PaX security patchset:

http://forums.grsecurity.net/viewtopic.php?f=3&t=3289&p=12551#p12551

This bug was introduced in commit 9f24e4208f7e, so it's been around
since 2.6.30.  :-(

Fix this by using an atomic64_t for struct orlav_stats's
free_clusters.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/mballoc.c
fs/ext4/resize.c
fs/ext4/super.c