linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg
@ 2017-01-13 11:54 Salvatore Benedetto
  2017-01-23 14:57 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Salvatore Benedetto @ 2017-01-13 11:54 UTC (permalink / raw)
  To: herbert; +Cc: salvatore.benedetto, linux-crypto

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg
  2017-01-13 11:54 [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg Salvatore Benedetto
@ 2017-01-23 14:57 ` Herbert Xu
  2017-01-23 17:06   ` Benedetto, Salvatore
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2017-01-23 14:57 UTC (permalink / raw)
  To: Salvatore Benedetto; +Cc: linux-crypto

On Fri, Jan 13, 2017 at 11:54:08AM +0000, Salvatore Benedetto wrote:
> 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>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg
  2017-01-23 14:57 ` Herbert Xu
@ 2017-01-23 17:06   ` Benedetto, Salvatore
  2017-02-01 14:06     ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Benedetto, Salvatore @ 2017-01-23 17:06 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, Benedetto, Salvatore

Hi Herbert,

> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org [mailto:linux-crypto-
> owner@vger.kernel.org] On Behalf Of Herbert Xu
> Sent: Monday, January 23, 2017 2:58 PM
> To: Benedetto, Salvatore <salvatore.benedetto@intel.com>
> Cc: linux-crypto@vger.kernel.org
> Subject: Re: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before
> registering an alg
> 
> On Fri, Jan 13, 2017 at 11:54:08AM +0000, Salvatore Benedetto wrote:
> > 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>
> 
> Patch applied.  Thanks.

I forgot to add CC stable to it.

This error was introduced in 4.8 and so I think it should go into stable 4.8 and 4.9.

Should I resend or can you add that?

Regards,
Salvatore

> --
> Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page:
> http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the
> body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg
  2017-01-23 17:06   ` Benedetto, Salvatore
@ 2017-02-01 14:06     ` Herbert Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2017-02-01 14:06 UTC (permalink / raw)
  To: Benedetto, Salvatore; +Cc: linux-crypto

On Mon, Jan 23, 2017 at 05:06:34PM +0000, Benedetto, Salvatore wrote:
> 
> I forgot to add CC stable to it.
> 
> This error was introduced in 4.8 and so I think it should go into stable 4.8 and 4.9.
> 
> Should I resend or can you add that?

I had added it when applying the patch.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-01 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 11:54 [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg Salvatore Benedetto
2017-01-23 14:57 ` Herbert Xu
2017-01-23 17:06   ` Benedetto, Salvatore
2017-02-01 14:06     ` Herbert Xu

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).