aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/akcipher.c
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2019-01-10 11:41:59 -0800
committerJames Morris <james.morris@microsoft.com>2019-01-10 11:41:59 -0800
commit49e41801b335f64610bbfd23e8f2bbaf34d46276 (patch)
tree4fbedacd1de1bbd4054f07f93031aebcb7b7a919 /crypto/akcipher.c
parentsecurity: integrity: partial revert of make ima_main explicitly non-modular (diff)
parentLinux 5.0-rc1 (diff)
downloadlinux-dev-49e41801b335f64610bbfd23e8f2bbaf34d46276.tar.xz
linux-dev-49e41801b335f64610bbfd23e8f2bbaf34d46276.zip
Merge tag 'v5.0-rc1' into next-general
Linux 5.0-rc1 Sync to pick up LSM stacking work (which is based on -rc1).
Diffstat (limited to 'crypto/akcipher.c')
-rw-r--r--crypto/akcipher.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/crypto/akcipher.c b/crypto/akcipher.c
index cfbdb06d8ca8..0cbeae137e0a 100644
--- a/crypto/akcipher.c
+++ b/crypto/akcipher.c
@@ -30,15 +30,12 @@ static int crypto_akcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_akcipher rakcipher;
- strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type));
+ memset(&rakcipher, 0, sizeof(rakcipher));
- if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER,
- sizeof(struct crypto_report_akcipher), &rakcipher))
- goto nla_put_failure;
- return 0;
+ strscpy(rakcipher.type, "akcipher", sizeof(rakcipher.type));
-nla_put_failure:
- return -EMSGSIZE;
+ return nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER,
+ sizeof(rakcipher), &rakcipher);
}
#else
static int crypto_akcipher_report(struct sk_buff *skb, struct crypto_alg *alg)