Re: [PATCH 0/2] crypto: hisilicon/sec2 - fix uninitialized type_supported and drop unused hlf_q_num

Herbert Xu <[email protected]> Mon, 27 Jul 2026 10:35:48 +1000
Newsgroups org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Sat, Jul 18, 2026 at 11:05:11AM +0800, Chenghai Huang wrote:
> This series fixes a use-before-init bug in the hisilicon/sec2 driver
> and removes an unused field exposed in the same path.
> 
> The first patch sets ctx->type_supported in sec_ctx_base_init(), before
> the sec_create_qp_ctx() loop consumes it; otherwise the value read to
> select the callback is uninitialized on the first queue. The alg init
> paths then just select req_op from it.
> 
> The second patch drops sec_ctx.hlf_q_num, which is assigned but never
> read.
> 
> Chenghai Huang (2):
>   crypto: hisilicon/sec2 - fix uninitialized type_supported in
>     sec_create_qp_ctx
>   crypto: hisilicon/sec2 - remove unused sec_ctx.hlf_q_num
> 
>  drivers/crypto/hisilicon/sec2/sec.h        |  3 ---
>  drivers/crypto/hisilicon/sec2/sec_crypto.c | 25 +++++++++++-----------
>  2 files changed, 12 insertions(+), 16 deletions(-)
> 
> -- 
> 2.43.0

All applied.  Thanks.
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt