* [PATCH] crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
@ 2017-04-03 15:30 Horia Geantă
2017-04-05 14:08 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Horia Geantă @ 2017-04-03 15:30 UTC (permalink / raw)
To: Herbert Xu; +Cc: David S. Miller, linux-crypto, Dan Douglass
In case caam_jr_alloc() fails, ctx->dev carries the error code,
thus accessing it with dev_err() is incorrect.
Cc: <stable@vger.kernel.org> # 4.8+
Fixes: 8c419778ab57e ("crypto: caam - add support for RSA algorithm")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
---
drivers/crypto/caam/caampkc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index 32100c4851dd..49cbdcba7883 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -506,7 +506,7 @@ static int caam_rsa_init_tfm(struct crypto_akcipher *tfm)
ctx->dev = caam_jr_alloc();
if (IS_ERR(ctx->dev)) {
- dev_err(ctx->dev, "Job Ring Device allocation for transform failed\n");
+ pr_err("Job Ring Device allocation for transform failed\n");
return PTR_ERR(ctx->dev);
}
--
2.12.0.264.gd6db3f216544
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
2017-04-03 15:30 [PATCH] crypto: caam - fix invalid dereference in caam_rsa_init_tfm() Horia Geantă
@ 2017-04-05 14:08 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2017-04-05 14:08 UTC (permalink / raw)
To: Horia Geantă; +Cc: David S. Miller, linux-crypto, Dan Douglass
On Mon, Apr 03, 2017 at 06:30:07PM +0300, Horia Geantă wrote:
> In case caam_jr_alloc() fails, ctx->dev carries the error code,
> thus accessing it with dev_err() is incorrect.
>
> Cc: <stable@vger.kernel.org> # 4.8+
> Fixes: 8c419778ab57e ("crypto: caam - add support for RSA algorithm")
> Signed-off-by: Horia Geantă <horia.geanta@nxp.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] 2+ messages in thread
end of thread, other threads:[~2017-04-05 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 15:30 [PATCH] crypto: caam - fix invalid dereference in caam_rsa_init_tfm() Horia Geantă
2017-04-05 14:08 ` Herbert Xu
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.