lkml.org 
[lkml]   [2009]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH]crypto: Fix algorithm and driver duplicate registered
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;
}


\
 
 \ /
  Last update: 2009-11-18 17:59    [W:0.124 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site