From: Herbert Xu <herbert@gondor.apana.org.au>
To: Haotian Zhang <vulab@iscas.ac.cn>
Cc: gilad@benyossef.com, davem@davemloft.net,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: ccree: Correctly handle return of sg_nents_for_len
Date: Sat, 22 Nov 2025 11:13:52 +0800 [thread overview]
Message-ID: <aSEqcJ5k4JsErB2l@gondor.apana.org.au> (raw)
In-Reply-To: <20251110072041.941-1-vulab@iscas.ac.cn>
On Mon, Nov 10, 2025 at 03:20:41PM +0800, Haotian Zhang wrote:
> Fix error handling in cc_map_hash_request_update where sg_nents_for_len
> return value was assigned to u32, converting negative errors to large
> positive values before passing to sg_copy_to_buffer.
>
> Check sg_nents_for_len return value and propagate errors before
> assigning to areq_ctx->in_nents.
>
> Fixes: b7ec8530687a ("crypto: ccree - use std api when possible")
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
> ---
> drivers/crypto/ccree/cc_buffer_mgr.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
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
prev parent reply other threads:[~2025-11-22 3:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 7:20 Haotian Zhang
2025-11-22 3:13 ` Herbert Xu [this message]
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=aSEqcJ5k4JsErB2l@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=gilad@benyossef.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®