From: "Youquan,Song" <youquan.song@linux.intel.com>
To: herbert@gondor.apana.org.au
Cc: linux-kernel@vger.kernel.org, ying.huang@intel.com,
kent.liu@intel.com, youquan.song@intel.com
Subject: [PATCH]crypto: Fix algorithm and driver duplicate registered
Date: Wed, 18 Nov 2009 19:32:02 -0500 [thread overview]
Message-ID: <20091119003202.GA28448@youquan-linux.bj.intel.com> (raw)
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;
}
next reply other threads:[~2009-11-18 16:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-19 0:32 Youquan,Song [this message]
2009-11-19 0:18 ` [PATCH]crypto: Fix algorithm and driver duplicate registered 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
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=20091119003202.GA28448@youquan-linux.bj.intel.com \
--to=youquan.song@linux.intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kent.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ying.huang@intel.com \
--cc=youquan.song@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.