Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dm crypt: mark key as invalid until properly loaded
In crypt_set_key(), if a failure occurs while replacing the old key (e.g. tfm->setkey() fails) the key must not have DM_CRYPT_KEY_VALID flag set. Otherwise, the crypto layer would have an invalid key that still has DM_CRYPT_KEY_VALID flag set. Cc: [email protected] Signed-off-by: Ondrej Kozina <[email protected]> Reviewed-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
- Loading branch information