ext4: avoid clearing beyond i_blocks when truncating an inline data file
authorTheodore Ts'o <tytso@mit.edu>
Tue, 7 Jan 2014 17:58:19 +0000 (12:58 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 7 Jan 2014 17:58:19 +0000 (12:58 -0500)
commit09c455aaa8f47a94d5bafaa23d58365768210507
tree7fb44f2b231481487f6076d10f09939167a95bc2
parent65eddb56f465f314502679ceade6fc5848a53a50
ext4: avoid clearing beyond i_blocks when truncating an inline data file

A missing cast means that when we are truncating a file which is less
than 60 bytes, we don't clear the correct area of memory, and in fact
we can end up truncating the next inode in the inode table, or worse
yet, some other kernel data structure.

Addresses-Coverity-Id: #751987

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/inline.c