All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] crypto: omap-sham - potential Oops on error in probe
@ 2016-05-18 10:39 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-05-18 10:39 UTC (permalink / raw)
  To: Herbert Xu, Peter Ujfalusi; +Cc: David S. Miller, linux-crypto, kernel-janitors

This if statement is reversed so we end up either leaking or Oopsing on
error.

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");

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

* [patch] crypto: omap-sham - potential Oops on error in probe
@ 2016-05-18 10:39 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-05-18 10:39 UTC (permalink / raw)
  To: Herbert Xu, Peter Ujfalusi; +Cc: David S. Miller, linux-crypto, kernel-janitors

This if statement is reversed so we end up either leaking or Oopsing on
error.

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");

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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
  2016-05-18 10:39 ` Dan Carpenter
@ 2016-05-18 10:42   ` Peter Ujfalusi
  -1 siblings, 0 replies; 10+ messages in thread
From: Peter Ujfalusi @ 2016-05-18 10:42 UTC (permalink / raw)
  To: Dan Carpenter, Herbert Xu; +Cc: David S. Miller, linux-crypto, kernel-janitors

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

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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
@ 2016-05-18 10:42   ` Peter Ujfalusi
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Ujfalusi @ 2016-05-18 10:42 UTC (permalink / raw)
  To: Dan Carpenter, Herbert Xu; +Cc: David S. Miller, linux-crypto, kernel-janitors

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

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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
  2016-05-18 10:42   ` Peter Ujfalusi
@ 2016-05-18 11:44     ` Dan Carpenter
  -1 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-05-18 11:44 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Herbert Xu, David S. Miller, linux-crypto, kernel-janitors

On Wed, May 18, 2016 at 01:42:36PM +0300, Peter Ujfalusi wrote:
> 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?

I didn't see those static checker warnings so probably it means I can't
compile the drivers.  Could you do it?

regards,
dan carpenter


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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
@ 2016-05-18 11:44     ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-05-18 11:44 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Herbert Xu, David S. Miller, linux-crypto, kernel-janitors

On Wed, May 18, 2016 at 01:42:36PM +0300, Peter Ujfalusi wrote:
> 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?

I didn't see those static checker warnings so probably it means I can't
compile the drivers.  Could you do it?

regards,
dan carpenter


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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
  2016-05-18 11:44     ` Dan Carpenter
@ 2016-05-18 11:50       ` Peter Ujfalusi
  -1 siblings, 0 replies; 10+ messages in thread
From: Peter Ujfalusi @ 2016-05-18 11:50 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Herbert Xu, David S. Miller, linux-crypto, kernel-janitors

On 05/18/16 14:44, Dan Carpenter wrote:
> On Wed, May 18, 2016 at 01:42:36PM +0300, Peter Ujfalusi wrote:
>> 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?
> 
> I didn't see those static checker warnings so probably it means I can't
> compile the drivers.  Could you do it?

I have taken a look at omap-aes and omap-des. They are OK.

-- 
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

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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
@ 2016-05-18 11:50       ` Peter Ujfalusi
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Ujfalusi @ 2016-05-18 11:50 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Herbert Xu, David S. Miller, linux-crypto, kernel-janitors

On 05/18/16 14:44, Dan Carpenter wrote:
> On Wed, May 18, 2016 at 01:42:36PM +0300, Peter Ujfalusi wrote:
>> 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?
> 
> I didn't see those static checker warnings so probably it means I can't
> compile the drivers.  Could you do it?

I have taken a look at omap-aes and omap-des. They are OK.

-- 
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

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

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
  2016-05-18 10:39 ` Dan Carpenter
@ 2016-05-19 10:07   ` Herbert Xu
  -1 siblings, 0 replies; 10+ messages in thread
From: Herbert Xu @ 2016-05-19 10:07 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Peter Ujfalusi, David S. Miller, linux-crypto, kernel-janitors

On Wed, May 18, 2016 at 01:39:05PM +0300, Dan Carpenter wrote:
> This if statement is reversed so we end up either leaking or Oopsing on
> error.
> 
> Fixes: dbe246209bc1 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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] 10+ messages in thread

* Re: [patch] crypto: omap-sham - potential Oops on error in probe
@ 2016-05-19 10:07   ` Herbert Xu
  0 siblings, 0 replies; 10+ messages in thread
From: Herbert Xu @ 2016-05-19 10:07 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Peter Ujfalusi, David S. Miller, linux-crypto, kernel-janitors

On Wed, May 18, 2016 at 01:39:05PM +0300, Dan Carpenter wrote:
> This if statement is reversed so we end up either leaking or Oopsing on
> error.
> 
> Fixes: dbe246209bc1 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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] 10+ messages in thread

end of thread, other threads:[~2016-05-19 10:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 10:39 [patch] crypto: omap-sham - potential Oops on error in probe Dan Carpenter
2016-05-18 10:39 ` Dan Carpenter
2016-05-18 10:42 ` Peter Ujfalusi
2016-05-18 10:42   ` Peter Ujfalusi
2016-05-18 11:44   ` Dan Carpenter
2016-05-18 11:44     ` Dan Carpenter
2016-05-18 11:50     ` Peter Ujfalusi
2016-05-18 11:50       ` Peter Ujfalusi
2016-05-19 10:07 ` Herbert Xu
2016-05-19 10:07   ` 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.