Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	<linux-crypto@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [patch] crypto: omap-sham - potential Oops on error in probe
Date: Wed, 18 May 2016 13:42:36 +0300	[thread overview]
Message-ID: <21712178-666f-e2e2-24f3-fb0c513acc83@ti.com> (raw)
In-Reply-To: <20160518103905.GA10470@mwanda>

On 05/18/16 13:39, Dan Carpenter wrote:
> This if statement is reversed so we end up either leaking or Oopsing on
> error.

Oops, sorry for that.
Probably the other omap-* crypto drivers have the same issue? Can you send a
patch for them or should I do it?

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Fixes: dbe246209bc1 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index 6eefaa2..63464e8 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -1986,7 +1986,7 @@ err_algs:
>  					&dd->pdata->algs_info[i].algs_list[j]);
>  err_pm:
>  	pm_runtime_disable(dev);
> -	if (dd->polling_mode)
> +	if (!dd->polling_mode)
>  		dma_release_channel(dd->dma_lch);
>  data_err:
>  	dev_err(dev, "initialization failed.\n");
> 


-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-05-18 10:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 10:39 [patch] crypto: omap-sham - potential Oops on error in probe Dan Carpenter
2016-05-18 10:42 ` Peter Ujfalusi [this message]
2016-05-18 11:44   ` Dan Carpenter
2016-05-18 11:50     ` Peter Ujfalusi
2016-05-19 10:07 ` 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=21712178-666f-e2e2-24f3-fb0c513acc83@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox