Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1044834ybp; Fri, 4 Oct 2019 08:46:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzyEzt0tAQkBOMWoKY7rTSAvsUhsjt8xoghJngbAi93ivZk6Vh8l75VUaDBxXFycqhWYx2 X-Received: by 2002:a17:906:1248:: with SMTP id u8mr12797251eja.172.1570203986342; Fri, 04 Oct 2019 08:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570203986; cv=none; d=google.com; s=arc-20160816; b=tXUQQCo6XYGdXWYy9Uw/nUWuFM0ISvJC45ooXYattg/Y80xyKmDi3zSRRJ1IfO53gF AAyYlMXB2R8KMXINtdc7dQhkgsM51vMTVYs3XIef8sA8qP5Pp3qt5rrdQeEu0o6Qme0Y Kh7flM1l+LaL4FreCuBQIA/qQecNK3NzmHsU+vYzXTQGW0VhzRqDEob81DCRGPYzR7Si SBG1kwuw1jB3vvuGTmuQLYUb41MzzaN9l/nIccmFJ4EL5W1zUsU8XJbxYPSswIRn20UR HRDEz26RRoT9kKsR0lguDSxnhigfleFVpxCtQI3N3nBa/XnvahzcGAO2bXJ7zf5xa89m oQNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CdcrVntajXmofTkYJnmTLSQfXreCSrkrUZiRXeFDb0w=; b=TnIJQfXvFR2BD4Qa6wYJzWQijIfetQr9et6yiPsk91jAk5w3FP6cb+ixlWYc6+5lta Hkc4AVB0mqSUROaxtyEGmxObx0Mk3V6+9ykcDAAAJWVh1Nh6xls0Yeg1WKxLqrjCqZKx FAf4svtRAAQniK318FcF0rtA/4xRvg3tZGTKyOtrr7izgIkoHHXJ7KWClwSad41TtnSr iRqh/+fPlB1xOPpPIzXOG1RFhiXt3TKWcmnnJtKfd4Yl88sPp+CD+afA3B+e0nF9B+ji PdqPz5D0hHZVApylykabHInZv4po7/jfnFpm3tr5qY44Bt2VaaWpzA/+qfKY56CZRoDc sPUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15si3807439edm.414.2019.10.04.08.46.01; Fri, 04 Oct 2019 08:46:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389669AbfJDPp2 (ORCPT + 99 others); Fri, 4 Oct 2019 11:45:28 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:42644 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389807AbfJDPp2 (ORCPT ); Fri, 4 Oct 2019 11:45:28 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1iGPky-0001Rb-OR; Sat, 05 Oct 2019 01:44:37 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Sat, 05 Oct 2019 01:44:33 +1000 Date: Sat, 5 Oct 2019 01:44:33 +1000 From: Herbert Xu To: Navid Emamdoost Cc: ghook@amd.com, emamd001@umn.edu, smccaman@umn.edu, kjlu@umn.edu, Tom Lendacky , Gary Hook , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] crypto: ccp - Release all allocated memory if sha type is invalid Message-ID: <20191004154433.GX5148@gondor.apana.org.au> References: <7ffc6a77-f4e3-7db9-4ec6-53d6e01d881d@amd.com> <20190919160449.4303-1-navid.emamdoost@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190919160449.4303-1-navid.emamdoost@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Sep 19, 2019 at 11:04:48AM -0500, Navid Emamdoost wrote: > Release all allocated memory if sha type is invalid: > In ccp_run_sha_cmd, if the type of sha is invalid, the allocated > hmac_buf should be released. > > v2: fix the goto. > > Signed-off-by: Navid Emamdoost > --- > drivers/crypto/ccp/ccp-ops.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt