]> git.baikalelectronics.ru Git - kernel.git/commit
dm crypt: reject sector_size feature if device length is not aligned to it
authorMilan Broz <gmazyland@gmail.com>
Wed, 13 Sep 2017 13:45:56 +0000 (15:45 +0200)
committerMike Snitzer <snitzer@redhat.com>
Wed, 4 Oct 2017 14:49:58 +0000 (10:49 -0400)
commitd3e711eef800062637ea985141694ccdef6873d4
treebc41ab9d2de82b5aedf85216eacdadd61b44d770
parent7123fe7d5557a40ede3b2215679db396c4a44ce1
dm crypt: reject sector_size feature if device length is not aligned to it

If a crypt mapping uses optional sector_size feature, additional
restrictions to mapped device segment size must be applied in
constructor, otherwise the device activation will fail later.

Fixes: 03cac145ae ("dm crypt: optionally support larger encryption sector size")
Cc: stable@vger.kernel.org # 4.12+
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-crypt.c