From: Corentin LABBE <clabbe.montjoie@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Chen-Yu Tsai <wens@csie.org>
Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next v2] crypto: sun4i-ss - fix missing unlock on error in sun4i_hash()
Date: Tue, 23 Aug 2016 15:54:46 +0200 [thread overview]
Message-ID: <ef5d41ec-132c-324f-7bb0-841911699ab5@gmail.com> (raw)
In-Reply-To: <1471690133-24396-1-git-send-email-weiyj.lk@gmail.com>
On 20/08/2016 12:48, Wei Yongjun wrote:
> Add the missing unlock before return from function sun4i_hash()
> in the error handling case.
>
> Fixes: 477d9b2e591b ("crypto: sun4i-ss - unify update/final function")
> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
> ---
> v1 -> v2: goto release_ss as LABBE Corentin's suggestion
> ---
> drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c
> index 2ee3b59..1afeb8e 100644
> --- a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c
> +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c
> @@ -245,7 +245,8 @@ int sun4i_hash(struct ahash_request *areq)
> if (end > areq->nbytes || areq->nbytes - end > 63) {
> dev_err(ss->dev, "ERROR: Bound error %u %u\n",
> end, areq->nbytes);
> - return -EINVAL;
> + err = -EINVAL;
> + goto release_ss;
> }
> } else {
> /* Since we have the flag final, we can go up to modulo 4 */
>
Acked-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Thanks
next prev parent reply other threads:[~2016-08-23 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 22:42 [PATCH -next] crypto: fix missing unlock on error in sun4i_hash() Wei Yongjun
2016-08-19 5:40 ` Corentin LABBE
2016-08-20 10:48 ` [PATCH -next v2] crypto: sun4i-ss - " Wei Yongjun
2016-08-23 13:54 ` Corentin LABBE [this message]
2016-08-24 13:14 ` 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=ef5d41ec-132c-324f-7bb0-841911699ab5@gmail.com \
--to=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=weiyj.lk@gmail.com \
--cc=wens@csie.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