4.2.8-ckt3 -stable review patch.  If anyone has any objections, please let me 
know.

---8<------------------------------------------------------------

From: Laurent Navet <[email protected]>

commit d76d99b219e1a233a720775c0451c310d34594e8 upstream.

Return value of ext4_derive_key_aes() is stored but not used.
Add test to exit cleanly if ext4_derive_key_aes() fail.
Also fix coverity CID 1309760.

Signed-off-by: Laurent Navet <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
---
 fs/ext4/crypto_key.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c
index 9bad113..dde261b 100644
--- a/fs/ext4/crypto_key.c
+++ b/fs/ext4/crypto_key.c
@@ -230,6 +230,8 @@ retry:
        }
        res = ext4_derive_key_aes(ctx.nonce, master_key->raw,
                                  raw_key);
+       if (res)
+               goto out;
 got_key:
        ctfm = crypto_alloc_ablkcipher(cipher_str, 0, 0);
        if (!ctfm || IS_ERR(ctfm)) {
-- 
1.9.1

Reply via email to