]> git.baikalelectronics.ru Git - kernel.git/commit
dm crypt: wipe private IV struct after key invalid flag is set
authorMilan Broz <gmazyland@gmail.com>
Tue, 9 Jul 2019 13:22:12 +0000 (15:22 +0200)
committerMike Snitzer <snitzer@redhat.com>
Tue, 9 Jul 2019 18:14:21 +0000 (14:14 -0400)
commit019cfb00127f8dc32cfd2ab29b99064314112753
treef2bec54623cbca5900e467c5b159293850ba1c22
parentacaae88238d4918411cc8938765a35c11703c34e
dm crypt: wipe private IV struct after key invalid flag is set

If a private IV wipe function fails, the code does not set the key
invalid flag.  To fix this, move code to after the flag is set to
prevent the device from resuming in an inconsistent state.

Also, this allows using of a randomized key in private wipe function
(to be used in a following commit).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-crypt.c