aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-08-30 09:09:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-08-30 09:09:54 -0700
commitfbcb0b4feb5c3f5431a2ed9f0211653864cf2104 (patch)
treeb0558ea758408c579bd62b31940f3480d4f3da1c /net
parentMerge tag 'mmc-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc (diff)
parentrbd: restore zeroing past the overlap when reading from parent (diff)
downloadlinux-dev-fbcb0b4feb5c3f5431a2ed9f0211653864cf2104.tar.xz
linux-dev-fbcb0b4feb5c3f5431a2ed9f0211653864cf2104.zip
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;
+ }
}
}