From: Herbert Xu <herbert@gondor.apana.org.au>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: mario.limonciello@amd.com, thomas.lendacky@amd.com,
john.allen@amd.com, davem@davemloft.net,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, runyu.xiao@seu.edu.cn,
jianhao.xu@seu.edu.cn
Subject: Re: [PATCH v2] crypto: ccp: Initialize DBC ioctl mutex before registering device
Date: Fri, 11 Sep 2026 15:32:35 +1000 [thread overview]
Message-ID: <aqOScxbMjvMWmB-I@gondor.apana.org.au> (raw)
In-Reply-To: <20260830015104.2040153-1-runyu.xiao@seu.edu.cn>
Runyu Xiao <runyu.xiao@seu.edu.cn> wrote:
> dbc_dev_init() registers the DBC misc device before initializing
> ioctl_mutex. Once misc_register() publishes the device, userspace can
> open it and invoke dbc_ioctl() while the mutex is still uninitialized.
>
> Initialize ioctl_mutex before calling misc_register() so the published
> ioctl callback always sees an initialized mutex.
>
> Fixes: c04cf9e14f10 ("crypto: ccp - Add support for fetching a nonce for dynamic boost control")
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/all/20260829133410.1708684-1-runyu.xiao@seu.edu.cn/
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
> Assisted-by: Codex:GPT-5
> ---
> v2:
> - Move mutex initialization before setting up the misc device, as suggested
> by Tom Lendacky.
>
> drivers/crypto/ccp/dbc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
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
next prev parent reply other threads:[~2026-09-11 5:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 13:34 [PATCH] crypto: ccp: Initialize DBC ioctl mutex before registering device Runyu Xiao
2026-08-29 15:07 ` Tom Lendacky
2026-08-30 1:51 ` [PATCH v2] " Runyu Xiao
2026-08-30 15:19 ` Tom Lendacky
2026-08-31 16:08 ` Mario Limonciello
2026-09-11 5:32 ` Herbert Xu [this message]
2026-08-31 16:07 ` [PATCH] " Mario Limonciello
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=aqOScxbMjvMWmB-I@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=jianhao.xu@seu.edu.cn \
--cc=john.allen@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=stable@vger.kernel.org \
--cc=thomas.lendacky@amd.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