]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: avoid modifying checksum fields directly during checksum verification
authorDaeho Jeong <daeho.jeong@samsung.com>
Sun, 3 Jul 2016 21:51:39 +0000 (17:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:20:26 +0000 (08:20 +0200)
commitc9274d891869880648c4ee9365df3ecc7ba2e285
tree54b0333c83e1a020c7eab5a905417feafaca5fbf
parent5f4100b7447787b1d86476ef5743f9d690390c3f
ext4: avoid modifying checksum fields directly during checksum verification

commit b47820edd1634dc1208f9212b7ecfb4230610a23 upstream.

We temporally change checksum fields in buffers of some types of
metadata into '0' for verifying the checksum values. By doing this
without locking the buffer, some metadata's checksums, which are
being committed or written back to the storage, could be damaged.
In our test, several metadata blocks were found with damaged metadata
checksum value during recovery process. When we only verify the
checksum value, we have to avoid modifying checksum fields directly.

Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com>
Signed-off-by: Youngjin Gil <youngjin.gil@samsung.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Török Edwin <edwin@etorok.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c
fs/ext4/namei.c
fs/ext4/super.c
fs/ext4/xattr.c