]> git.baikalelectronics.ru Git - 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)
committerMike Snitzer <snitzer@redhat.com>
Tue, 25 Feb 2020 17:06:08 +0000 (12:06 -0500)
commit9b56e04e27de73a3292cd1d9d561e60fc29917fc
tree334a0c6ca087d29ff7b1b4f43306c7936d531d55
parent474179f4724c7c0479d466e4c5dee457a8172aab
dm integrity: fix invalid table returned due to argument count mismatch

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: f6d6f7653b0d ("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>
drivers/md/dm-integrity.c