Merge branch 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx...
[linux-drm-fsl-dcu.git] / crypto / pcrypt.c
index 45e7d515567294506142904fd771005c8e1ca70c..ee9cfb99fe256af06ae7ad5d946c3b76d90de1e9 100644 (file)
@@ -274,11 +274,16 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb,
                              u32 type, u32 mask)
 {
        struct pcrypt_instance_ctx *ctx;
+       struct crypto_attr_type *algt;
        struct aead_instance *inst;
        struct aead_alg *alg;
        const char *name;
        int err;
 
+       algt = crypto_get_attr_type(tb);
+       if (IS_ERR(algt))
+               return PTR_ERR(algt);
+
        name = crypto_attr_alg_name(tb[1]);
        if (IS_ERR(name))
                return PTR_ERR(name);
@@ -299,6 +304,8 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb,
        if (err)
                goto out_drop_aead;
 
+       inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC;
+
        inst->alg.ivsize = crypto_aead_alg_ivsize(alg);
        inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg);