[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091119003202.GA28448@youquan-linux.bj.intel.com>
Date: Wed, 18 Nov 2009 19:32:02 -0500
From: "Youquan,Song" <youquan.song@...ux.intel.com>
To: herbert@...dor.apana.org.au
Cc: linux-kernel@...r.kernel.org, ying.huang@...el.com,
kent.liu@...el.com, youquan.song@...el.com
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@...el.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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists