From: Jaemin Ryu Date: Fri, 14 Dec 2018 01:26:37 +0000 (+0900) Subject: Update engine state only if cryto device is properly created X-Git-Tag: accepted/tizen/4.0/unified/20190101.230229^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b278154c2bf23eb95c73fd10e9a3dda064f2b546;p=platform%2Fcore%2Fsecurity%2Fode.git Update engine state only if cryto device is properly created Change-Id: I1d3c9d11932afa22a2b7ea2dc101eba36ec39cf7 Signed-off-by: Jaemin Ryu --- diff --git a/server/engine/encryption/dmcrypt-engine.cpp b/server/engine/encryption/dmcrypt-engine.cpp index 4fbba93..a9f272b 100644 --- a/server/engine/encryption/dmcrypt-engine.cpp +++ b/server/engine/encryption/dmcrypt-engine.cpp @@ -356,11 +356,12 @@ void DMCryptEngine::decrypt(const BinaryData &key, unsigned int options) // create crypto type device mapping layer to mount the plain partition // should be encrypted here. auto cryptoBlkDev = createCryptoBlkDev(source, DM_DEFAULT_LABEL_NAME, sanitizeKey(key), DM_DEFAULT_CRYPTO_NAME); - start = true; // Force filesystem check via fcsf might be able to avoid fail situation during decryption. Ext4Tool ext4CryptoBlkDev(cryptoBlkDev); + start = true; + for (int retry = 0; retry < 32; retry++) { try { ext4CryptoBlkDev.forceCleanUp();