aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds2019-08-30 09:09:54 -0700
committerLinus Torvalds2019-08-30 09:09:54 -0700
commitfbcb0b4feb5c3f5431a2ed9f0211653864cf2104 (patch)
treeb0558ea758408c579bd62b31940f3480d4f3da1c /net
parent0d70787b65941a8db36fd2c35d25c93178f8b545 (diff)
parentd435c9a7b85be1e820668d2f3718c2d9f24d5548 (diff)
Merge tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client
Pull two ceph fixes from Ilya Dryomov: "A fix for a -rc1 regression in rbd and a trivial static checker fix" * tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client: rbd: restore zeroing past the overlap when reading from parent libceph: don't call crypto_free_sync_skcipher() on a NULL tfm
Diffstat (limited to 'net')
-rw-r--r--net/ceph/crypto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c
index 5d6724cee38f..4f75df40fb12 100644
--- a/net/ceph/crypto.c
+++ b/net/ceph/crypto.c
@@ -136,8 +136,10 @@ void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
if (key) {
kfree(key->key);
key->key = NULL;
- crypto_free_sync_skcipher(key->tfm);
- key->tfm = NULL;
+ if (key->tfm) {
+ crypto_free_sync_skcipher(key->tfm);
+ key->tfm = NULL;
+ }
}
}