public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: ccp - fix error handling
@ 2020-09-21 11:34 Pavel Machek
  2020-09-22 12:59 ` John Allen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pavel Machek @ 2020-09-21 11:34 UTC (permalink / raw)
  To: thomas.lendacky, john.allen, herbert, davem, linux-crypto,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

Fix resource leak in error handling.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index bd270e66185e..40869ea1ed20 100644
--- a/drivers/crypto/ccp/ccp-ops.c
+++ b/drivers/crypto/ccp/ccp-ops.c
@@ -1744,7 +1744,7 @@ ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
 			break;
 		default:
 			ret = -EINVAL;
-			goto e_ctx;
+			goto e_data;
 		}
 	} else {
 		/* Stash the context */

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH] crypto: ccp - fix error handling
  2020-09-21 11:34 [PATCH] crypto: ccp - fix error handling Pavel Machek
@ 2020-09-22 12:59 ` John Allen
  2020-09-22 13:41 ` Tom Lendacky
  2020-10-02 11:54 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: John Allen @ 2020-09-22 12:59 UTC (permalink / raw)
  To: Pavel Machek; +Cc: thomas.lendacky, herbert, davem, linux-crypto, linux-kernel

On Mon, Sep 21, 2020 at 01:34:35PM +0200, Pavel Machek wrote:
> Fix resource leak in error handling.
> 
> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

Acked-by: John Allen <john.allen@amd.com>

> 
> diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
> index bd270e66185e..40869ea1ed20 100644
> --- a/drivers/crypto/ccp/ccp-ops.c
> +++ b/drivers/crypto/ccp/ccp-ops.c
> @@ -1744,7 +1744,7 @@ ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
>  			break;
>  		default:
>  			ret = -EINVAL;
> -			goto e_ctx;
> +			goto e_data;
>  		}
>  	} else {
>  		/* Stash the context */
> 
> -- 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany



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

* Re: [PATCH] crypto: ccp - fix error handling
  2020-09-21 11:34 [PATCH] crypto: ccp - fix error handling Pavel Machek
  2020-09-22 12:59 ` John Allen
@ 2020-09-22 13:41 ` Tom Lendacky
  2020-10-02 11:54 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Lendacky @ 2020-09-22 13:41 UTC (permalink / raw)
  To: Pavel Machek, Allen, John, herbert@gondor.apana.org.au,
	davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org

On 9/21/20 6:34 AM, Pavel Machek wrote:
> Fix resource leak in error handling.

Does it need a Fixes: tag?

Thanks,
Tom

> 
> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
> 
> diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
> index bd270e66185e..40869ea1ed20 100644
> --- a/drivers/crypto/ccp/ccp-ops.c
> +++ b/drivers/crypto/ccp/ccp-ops.c
> @@ -1744,7 +1744,7 @@ ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
>  			break;
>  		default:
>  			ret = -EINVAL;
> -			goto e_ctx;
> +			goto e_data;
>  		}
>  	} else {
>  		/* Stash the context */
> 

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

* Re: [PATCH] crypto: ccp - fix error handling
  2020-09-21 11:34 [PATCH] crypto: ccp - fix error handling Pavel Machek
  2020-09-22 12:59 ` John Allen
  2020-09-22 13:41 ` Tom Lendacky
@ 2020-10-02 11:54 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2020-10-02 11:54 UTC (permalink / raw)
  To: Pavel Machek
  Cc: thomas.lendacky, john.allen, davem, linux-crypto, linux-kernel

On Mon, Sep 21, 2020 at 01:34:35PM +0200, Pavel Machek wrote:
> Fix resource leak in error handling.
> 
> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

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] 4+ messages in thread

end of thread, other threads:[~2020-10-02 11:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21 11:34 [PATCH] crypto: ccp - fix error handling Pavel Machek
2020-09-22 12:59 ` John Allen
2020-09-22 13:41 ` Tom Lendacky
2020-10-02 11:54 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox