net/mlx4_core: Fix racy CQ (Completion Queue) free
[linux-2.6-block.git] / crypto / crypto_user.c
index 1c5705481c6985ad58240ae7514dd5ef0b950582..a90404a0c5ff1dd0cd68c857575705aaa3190bae 100644 (file)
@@ -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;