]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: fix superblock checksum failure when setting password salt
authorJan Kara <jack@suse.cz>
Wed, 16 Dec 2020 10:18:43 +0000 (11:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:48:44 +0000 (15:48 +0100)
commit9dd21048ad50e57a862aa4ba8796063041379bec
treeb43732c650dea1a8c5b35e23e12d97a168d0f1fb
parentd00e517fa8dfe5509dfb82c656b12cd13dca1a2e
ext4: fix superblock checksum failure when setting password salt

commit dfd56c2c0c0dbb11be939b804ddc8d5395ab3432 upstream.

When setting password salt in the superblock, we forget to recompute the
superblock checksum so it will not match until the next superblock
modification which recomputes the checksum. Fix it.

CC: Michael Halcrow <mhalcrow@google.com>
Reported-by: Andreas Dilger <adilger@dilger.ca>
Fixes: 9bd8212f981e ("ext4 crypto: add encryption policy and password salt support")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20201216101844.22917-8-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ioctl.c