dm verity: fix overflow check
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 26 Sep 2012 22:45:48 +0000 (23:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:35:50 +0000 (08:35 -0700)
commit476ea1eec94025cbdc073e9e1df6a03ec47b3684
treedba41e78164d996b082869bcbafca0c9d46bad23
parentbfa27f1c573ce282f2cb57d2840be8559ed6890f
dm verity: fix overflow check

commit 1d55f6bcc0331d744cd5b56c4ee79e3809438161 upstream.

This patch fixes sector_t overflow checking in dm-verity.

Without this patch, the code checks for overflow only if sector_t is
smaller than long long, not if sector_t and long long have the same size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-verity.c