Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm verity: fix DM_VERITY_OPTS_MAX value

Three optional parameters must be accepted at once in a DM verity table, e.g.:
(verity_error_handling_mode) (ignore_zero_block) (check_at_most_once)
Fix this to be possible by incrementing DM_VERITY_OPTS_MAX.

Signed-off-by: JeongHyeon Lee <jhs2.lee@samsung.com>
Fixes: 843f38d382b1 ("dm verity: add 'check_at_most_once' option to only validate hashes once")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

authored by

JeongHyeon Lee and committed by
Mike Snitzer
160f99db 0d02ec6b

+1 -1
+1 -1
drivers/md/dm-verity-target.c
··· 34 34 #define DM_VERITY_OPT_IGN_ZEROES "ignore_zero_blocks" 35 35 #define DM_VERITY_OPT_AT_MOST_ONCE "check_at_most_once" 36 36 37 - #define DM_VERITY_OPTS_MAX (2 + DM_VERITY_OPTS_FEC + \ 37 + #define DM_VERITY_OPTS_MAX (3 + DM_VERITY_OPTS_FEC + \ 38 38 DM_VERITY_ROOT_HASH_VERIFICATION_OPTS) 39 39 40 40 static unsigned dm_verity_prefetch_cluster = DM_VERITY_DEFAULT_PREFETCH_SIZE;