dm-verity: align struct dm_verity_fec_io properly
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 28 Nov 2023 13:50:23 +0000 (14:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:51:14 +0000 (08:51 +0100)
commit7d2faae81b576a67287e97161f414d070d74ce96
tree165431b92857867aa86d26ea8b2a95fb170295f5
parentda9f55393f69b16a5598d9cd4768f12ca5d6c62a
dm-verity: align struct dm_verity_fec_io properly

commit 38bc1ab135db87577695816b190e7d6d8ec75879 upstream.

dm_verity_fec_io is placed after the end of two hash digests. If the hash
digest has unaligned length, struct dm_verity_fec_io could be unaligned.

This commit fixes the placement of struct dm_verity_fec_io, so that it's
aligned.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Fixes: a739ff3f543a ("dm verity: add support for forward error correction")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-verity-fec.c
drivers/md/dm-verity.h