linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] crypto: chcr - Add AEAD algos.
@ 2016-12-01 20:48 Dan Carpenter
  2017-01-24 10:43 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-12-01 20:48 UTC (permalink / raw)
  To: harsh; +Cc: linux-crypto

Hello Harsh Jain,

This is a semi-automatic email about new static checker warnings.

The patch 2debd3325e55: "crypto: chcr - Add AEAD algos." from Nov 29, 
2016, leads to the following Smatch complaint:

	drivers/crypto/chelsio/chcr_algo.c:2460 chcr_aead_op()
	warn: variable dereferenced before check 'ctx' (see line 2457)

	drivers/crypto/chelsio/chcr_algo.c:2460 chcr_aead_op()
	warn: variable dereferenced before check 'ctx->dev' (see line 2457)

drivers/crypto/chelsio/chcr_algo.c
  2456		struct chcr_context *ctx = crypto_aead_ctx(tfm);
  2457		struct uld_ctx *u_ctx = ULD_CTX(ctx);
                                        ^^^^^^^^^^^^
Derefences both.

  2458		struct sk_buff *skb;
  2459	
  2460		if (ctx && !ctx->dev) {
                    ^^^^^^^^^^^^^^^^
Check is too late.

  2461			pr_err("chcr : %s : No crypto device.\n", __func__);
  2462			return -ENXIO;

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] crypto: chcr - Add AEAD algos.
  2016-12-01 20:48 [bug report] crypto: chcr - Add AEAD algos Dan Carpenter
@ 2017-01-24 10:43 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2017-01-24 10:43 UTC (permalink / raw)
  To: harsh; +Cc: linux-crypto

Ping?

regards,
dan carpenter

On Thu, Dec 01, 2016 at 11:48:58PM +0300, Dan Carpenter wrote:
> Hello Harsh Jain,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 2debd3325e55: "crypto: chcr - Add AEAD algos." from Nov 29, 
> 2016, leads to the following Smatch complaint:
> 
> 	drivers/crypto/chelsio/chcr_algo.c:2460 chcr_aead_op()
> 	warn: variable dereferenced before check 'ctx' (see line 2457)
> 
> 	drivers/crypto/chelsio/chcr_algo.c:2460 chcr_aead_op()
> 	warn: variable dereferenced before check 'ctx->dev' (see line 2457)
> 
> drivers/crypto/chelsio/chcr_algo.c
>   2456		struct chcr_context *ctx = crypto_aead_ctx(tfm);
>   2457		struct uld_ctx *u_ctx = ULD_CTX(ctx);
>                                         ^^^^^^^^^^^^
> Derefences both.
> 
>   2458		struct sk_buff *skb;
>   2459	
>   2460		if (ctx && !ctx->dev) {
>                     ^^^^^^^^^^^^^^^^
> Check is too late.
> 
>   2461			pr_err("chcr : %s : No crypto device.\n", __func__);
>   2462			return -ENXIO;
> 
> regards,
> dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-24 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-01 20:48 [bug report] crypto: chcr - Add AEAD algos Dan Carpenter
2017-01-24 10:43 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).