linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Salvatore Benedetto <salvatore.benedetto@intel.com>
To: herbert@gondor.apana.org.au
Cc: salvatore.benedetto@intel.com, linux-crypto@vger.kernel.org
Subject: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg
Date: Fri, 13 Jan 2017 11:54:08 +0000	[thread overview]
Message-ID: <1484308448-3225-1-git-send-email-salvatore.benedetto@intel.com> (raw)

Make sure CRYPTO_ALG_DEAD bit is cleared before proceeding with
the algorithm registration. This fixes qat-dh registration when
driver is restarted

Signed-off-by: Salvatore Benedetto <salvatore.benedetto@intel.com>
---
 crypto/algapi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/algapi.c b/crypto/algapi.c
index df939b5..1fad2a6 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -356,6 +356,7 @@ int crypto_register_alg(struct crypto_alg *alg)
 	struct crypto_larval *larval;
 	int err;
 
+	alg->cra_flags &= ~CRYPTO_ALG_DEAD;
 	err = crypto_check_alg(alg);
 	if (err)
 		return err;
-- 
2.7.4

             reply	other threads:[~2017-01-13 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 11:54 Salvatore Benedetto [this message]
2017-01-23 14:57 ` [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg Herbert Xu
2017-01-23 17:06   ` Benedetto, Salvatore
2017-02-01 14:06     ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484308448-3225-1-git-send-email-salvatore.benedetto@intel.com \
    --to=salvatore.benedetto@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).