* [PATCH] crypto: replace kmalloc and then memcpy with kmemdup
@ 2013-03-11 10:48 Mihnea Dobrescu-Balaur
2013-03-21 9:54 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Mihnea Dobrescu-Balaur @ 2013-03-11 10:48 UTC (permalink / raw)
To: linux-crypto
Cc: herbert, davem, linus.walleij, andreas.westin, arnd, rubini,
linux-kernel, Mihnea Dobrescu-Balaur
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb@gmail.com>
---
drivers/crypto/ux500/hash/hash_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 632c333..8d16d3a 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -1368,14 +1368,12 @@ static int hash_setkey(struct crypto_ahash *tfm,
/**
* Freed in final.
*/
- ctx->key = kmalloc(keylen, GFP_KERNEL);
+ ctx->key = kmemdup(key, keylen, GFP_KERNEL);
if (!ctx->key) {
pr_err(DEV_DBG_NAME " [%s] Failed to allocate ctx->key "
"for %d\n", __func__, alg);
return -ENOMEM;
}
-
- memcpy(ctx->key, key, keylen);
ctx->keylen = keylen;
return ret;
--
1.7.10.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: replace kmalloc and then memcpy with kmemdup
2013-03-11 10:48 [PATCH] crypto: replace kmalloc and then memcpy with kmemdup Mihnea Dobrescu-Balaur
@ 2013-03-21 9:54 ` Herbert Xu
2013-03-21 18:18 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2013-03-21 9:54 UTC (permalink / raw)
To: Mihnea Dobrescu-Balaur
Cc: linux-crypto, davem, linus.walleij, andreas.westin, arnd, rubini,
linux-kernel
On Mon, Mar 11, 2013 at 12:48:10PM +0200, Mihnea Dobrescu-Balaur wrote:
> Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb@gmail.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] 3+ messages in thread
* Re: [PATCH] crypto: replace kmalloc and then memcpy with kmemdup
2013-03-21 9:54 ` Herbert Xu
@ 2013-03-21 18:18 ` Linus Walleij
0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-03-21 18:18 UTC (permalink / raw)
To: Herbert Xu
Cc: Mihnea Dobrescu-Balaur, linux-crypto, davem, andreas.westin,
arnd, rubini, linux-kernel
On Thu, Mar 21, 2013 at 10:54 AM, Herbert Xu
<herbert@gondor.apana.org.au> wrote:
> On Mon, Mar 11, 2013 at 12:48:10PM +0200, Mihnea Dobrescu-Balaur wrote:
>> Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb@gmail.com>
>
> Patch applied. Thanks.
Acked-by: Linus Walleij <linus.walleij@linaro.org> FWIW, I tried to get the
people involved with the code to ACK but somehow they must've missed it.
Thanks,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-21 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-11 10:48 [PATCH] crypto: replace kmalloc and then memcpy with kmemdup Mihnea Dobrescu-Balaur
2013-03-21 9:54 ` Herbert Xu
2013-03-21 18:18 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®