Skip to content

Commit

Permalink
dm verity: fix DM_VERITY_OPTS_MAX value
Browse files Browse the repository at this point in the history
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: 843f38d ("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>
  • Loading branch information
JeongHyeon Lee authored and Mike Snitzer committed Mar 22, 2021
1 parent 0d02ec6 commit 160f99d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-verity-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define DM_VERITY_OPT_IGN_ZEROES "ignore_zero_blocks"
#define DM_VERITY_OPT_AT_MOST_ONCE "check_at_most_once"

#define DM_VERITY_OPTS_MAX (2 + DM_VERITY_OPTS_FEC + \
#define DM_VERITY_OPTS_MAX (3 + DM_VERITY_OPTS_FEC + \
DM_VERITY_ROOT_HASH_VERIFICATION_OPTS)

static unsigned dm_verity_prefetch_cluster = DM_VERITY_DEFAULT_PREFETCH_SIZE;
Expand Down

0 comments on commit 160f99d

Please sign in to comment.