The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH]crypto: Fix algorithm and driver duplicate registered
@ 2009-11-19  0:32 Youquan,Song
  2009-11-19  0:18 ` Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Youquan,Song @ 2009-11-19  0:32 UTC (permalink / raw)
  To: herbert; +Cc: linux-kernel, ying.huang, kent.liu, youquan.song

Current kernel, All the algorithms with same algorithm name and driver name
are registered. 
But the proper behaviour should be only one algorithm be registered when 
algorithm and driver name duplicate.

Signed-off-by: Youquan, Song <youquan.song@intel.com>
---

diff --git a/crypto/algapi.c b/crypto/algapi.c
index f149b1c..a823fb2 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -207,8 +207,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
 			continue;
 		}
 
-		if (!strcmp(q->cra_driver_name, alg->cra_name) ||
-		    !strcmp(q->cra_name, alg->cra_driver_name))
+		if (!strcmp(q->cra_driver_name, alg->cra_driver_name) &&
+		    !strcmp(q->cra_name, alg->cra_name))
 			goto err;
 	}
 

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

end of thread, other threads:[~2009-11-25  3:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-19  0:32 [PATCH]crypto: Fix algorithm and driver duplicate registered Youquan,Song
2009-11-19  0:18 ` Herbert Xu
2009-11-19 11:02   ` Youquan,Song
2009-11-19 11:47     ` Herbert Xu
2009-11-23 17:21       ` Youquan,Song
2009-11-23 10:52         ` Herbert Xu
2009-11-23 17:47       ` Youquan,Song
2009-11-23 11:31         ` Herbert Xu
2009-11-25 10:35           ` Youquan,Song
2009-11-25  3:12             ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox