From: Chenghai Huang <huangchenghai2@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
<liulongfang@huawei.com>, <qianweili@huawei.com>,
<wangzhou1@hisilicon.com>
Subject: [PATCH 0/2] crypto: hisilicon/sec2 - fix uninitialized type_supported and drop unused hlf_q_num
Date: Sat, 18 Jul 2026 11:05:11 +0800 [thread overview]
Message-ID: <20260718030513.3809002-1-huangchenghai2@huawei.com> (raw)
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
next reply other threads:[~2026-07-18 3:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 3:05 Chenghai Huang [this message]
2026-07-18 3:05 ` [PATCH 1/2] crypto: hisilicon/sec2 - fix uninitialized type_supported in sec_create_qp_ctx Chenghai Huang
2026-07-18 3:05 ` [PATCH 2/2] crypto: hisilicon/sec2 - remove unused sec_ctx.hlf_q_num Chenghai Huang
2026-07-27 0:35 ` [PATCH 0/2] crypto: hisilicon/sec2 - fix uninitialized type_supported and drop unused hlf_q_num 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=20260718030513.3809002-1-huangchenghai2@huawei.com \
--to=huangchenghai2@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=qianweili@huawei.com \
--cc=wangzhou1@hisilicon.com \
/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