lkml.org 
[lkml]   [2017]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 129/130] libceph: uninline ceph_crypto_key_destroy()
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Ilya Dryomov <idryomov@gmail.com>

    commit 6db2304aabb070261ad34923bfd83c43dfb000e3 upstream.

    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Reviewed-by: Sage Weil <sage@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    net/ceph/crypto.c | 8 ++++++++
    net/ceph/crypto.h | 9 +--------
    2 files changed, 9 insertions(+), 8 deletions(-)

    --- a/net/ceph/crypto.c
    +++ b/net/ceph/crypto.c
    @@ -80,6 +80,14 @@ int ceph_crypto_key_unarmor(struct ceph_
    return 0;
    }

    +void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
    +{
    + if (key) {
    + kfree(key->key);
    + key->key = NULL;
    + }
    +}
    +
    static struct crypto_skcipher *ceph_crypto_alloc_cipher(void)
    {
    return crypto_alloc_skcipher("cbc(aes)", 0, CRYPTO_ALG_ASYNC);
    --- a/net/ceph/crypto.h
    +++ b/net/ceph/crypto.h
    @@ -14,19 +14,12 @@ struct ceph_crypto_key {
    void *key;
    };

    -static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
    -{
    - if (key) {
    - kfree(key->key);
    - key->key = NULL;
    - }
    -}
    -
    int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
    const struct ceph_crypto_key *src);
    int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
    int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
    int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
    +void ceph_crypto_key_destroy(struct ceph_crypto_key *key);

    /* crypto.c */
    int ceph_crypt(const struct ceph_crypto_key *key, bool encrypt,

    \
     
     \ /
      Last update: 2017-01-24 09:08    [W:4.154 / U:0.304 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site