[PATCH 0/2] crypto: hisilicon/sec2 - fix uninitialized type_supported and drop unused hlf_q_num
From: Chenghai Huang
Date: Fri Jul 17 2026 - 23:05:56 EST
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