diff options
Diffstat (limited to 'drivers/md/dm-verity.c')
-rw-r--r-- | drivers/md/dm-verity.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c index 254d19268ad2..892ae2766aa6 100644 --- a/drivers/md/dm-verity.c +++ b/drivers/md/dm-verity.c | |||
@@ -718,8 +718,8 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
718 | v->hash_dev_block_bits = ffs(num) - 1; | 718 | v->hash_dev_block_bits = ffs(num) - 1; |
719 | 719 | ||
720 | if (sscanf(argv[5], "%llu%c", &num_ll, &dummy) != 1 || | 720 | if (sscanf(argv[5], "%llu%c", &num_ll, &dummy) != 1 || |
721 | num_ll << (v->data_dev_block_bits - SECTOR_SHIFT) != | 721 | (sector_t)(num_ll << (v->data_dev_block_bits - SECTOR_SHIFT)) |
722 | (sector_t)num_ll << (v->data_dev_block_bits - SECTOR_SHIFT)) { | 722 | >> (v->data_dev_block_bits - SECTOR_SHIFT) != num_ll) { |
723 | ti->error = "Invalid data blocks"; | 723 | ti->error = "Invalid data blocks"; |
724 | r = -EINVAL; | 724 | r = -EINVAL; |
725 | goto bad; | 725 | goto bad; |
@@ -733,8 +733,8 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
733 | } | 733 | } |
734 | 734 | ||
735 | if (sscanf(argv[6], "%llu%c", &num_ll, &dummy) != 1 || | 735 | if (sscanf(argv[6], "%llu%c", &num_ll, &dummy) != 1 || |
736 | num_ll << (v->hash_dev_block_bits - SECTOR_SHIFT) != | 736 | (sector_t)(num_ll << (v->hash_dev_block_bits - SECTOR_SHIFT)) |
737 | (sector_t)num_ll << (v->hash_dev_block_bits - SECTOR_SHIFT)) { | 737 | >> (v->hash_dev_block_bits - SECTOR_SHIFT) != num_ll) { |
738 | ti->error = "Invalid hash start"; | 738 | ti->error = "Invalid hash start"; |
739 | r = -EINVAL; | 739 | r = -EINVAL; |
740 | goto bad; | 740 | goto bad; |