summaryrefslogtreecommitdiffstats
path: root/.mailmap
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <costa@purestorage.com>2020-09-14 18:10:14 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-10-18 16:36:23 +0200
commitacaa532687cdc3a03757defafece9c27aa667546 (patch)
tree061d645d569d85d456654578813b933adaac8d51 /.mailmap
parentext4: fix error handling code in add_new_gdb (diff)
downloadlinux-acaa532687cdc3a03757defafece9c27aa667546.tar.xz
linux-acaa532687cdc3a03757defafece9c27aa667546.zip
ext4: fix superblock checksum calculation race
The race condition could cause the persisted superblock checksum to not match the contents of the superblock, causing the superblock to be considered corrupt. An example of the race follows. A first thread is interrupted in the middle of a checksum calculation. Then, another thread changes the superblock, calculates a new checksum, and sets it. Then, the first thread resumes and sets the checksum based on the older superblock. To fix, serialize the superblock checksum calculation using the buffer header lock. While a spinlock is sufficient, the buffer header is already there and there is precedent for locking it (e.g. in ext4_commit_super). Tested the patch by booting up a kernel with the patch, creating a filesystem and some files (including some orphans), and then unmounting and remounting the file system. Cc: stable@kernel.org Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com> Reviewed-by: Jan Kara <jack@suse.cz> Suggested-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions