]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
dm integrity: fix invalid table returned due to argument count mismatch
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 17 Feb 2020 13:11:35 +0000 (08:11 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 13 Mar 2020 12:38:49 +0000 (13:38 +0100)
commite115fd51f32e3e7b5254df8f82ff2de8e81e965b
treef0bebba54bc892f28030fc639e0cf82d3628d2c3
parentd607d67c7a2d8eabe6f695cbe12ea67cc8d6a36f
dm integrity: fix invalid table returned due to argument count mismatch

BugLink: https://bugs.launchpad.net/bugs/1867178
commit 7fc2e47f40dd77ab1fcbda6db89614a0173d89c7 upstream.

If the flag SB_FLAG_RECALCULATE is present in the superblock, but it was
not specified on the command line (i.e. ic->recalculate_flag is false),
dm-integrity would return invalid table line - the reported number of
arguments would not match the real number.

Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode")
Cc: stable@vger.kernel.org # v5.2+
Reported-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/md/dm-integrity.c