diff options
author | Mike Marshall <hubcap@omnibond.com> | 2017-02-25 17:12:48 +0100 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2017-02-25 17:12:48 +0100 |
commit | e98bdb3059cbf2b1cd4261e126b08429f64466c3 (patch) | |
tree | e378fc95b495cc6e0e558f247e99bcaa21a6d567 /crypto/crypto_user.c | |
parent | orangefs: fix buffer size mis-match between kernel space and user space. (diff) | |
parent | Linux 4.10 (diff) | |
download | linux-e98bdb3059cbf2b1cd4261e126b08429f64466c3.tar.xz linux-e98bdb3059cbf2b1cd4261e126b08429f64466c3.zip |
Merge tag 'v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into for-next
Linux 4.10
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r-- | crypto/crypto_user.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 1c5705481c69..a90404a0c5ff 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -112,6 +112,21 @@ nla_put_failure: return -EMSGSIZE; } +static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) +{ + struct crypto_report_acomp racomp; + + strncpy(racomp.type, "acomp", sizeof(racomp.type)); + + if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, + sizeof(struct crypto_report_acomp), &racomp)) + goto nla_put_failure; + return 0; + +nla_put_failure: + return -EMSGSIZE; +} + static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; @@ -186,7 +201,11 @@ static int crypto_report_one(struct crypto_alg *alg, goto nla_put_failure; break; + case CRYPTO_ALG_TYPE_ACOMPRESS: + if (crypto_report_acomp(skb, alg)) + goto nla_put_failure; + break; case CRYPTO_ALG_TYPE_AKCIPHER: if (crypto_report_akcipher(skb, alg)) goto nla_put_failure; |