From: Herbert Xu <herbert@gondor.apana.org.au>
To: Wenkai Lin <linwenkai6@hisilicon.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
liulongfang@huawei.com, fanghao11@huawei.com, acc@openeuler.org
Subject: Re: [PATCH] crypto: hisilicon - Fix smp_processor_id() warnings
Date: Fri, 26 Jan 2024 17:05:31 +0800 [thread overview]
Message-ID: <ZbN128cDR4qisFha@gondor.apana.org.au> (raw)
In-Reply-To: <20240119081107.5306-1-linwenkai6@hisilicon.com>
On Fri, Jan 19, 2024 at 04:11:07PM +0800, Wenkai Lin wrote:
> Switch to raw_smp_processor_id() to prevent a number of
> warnings from kernel debugging. We do not care about
> preemption here, as the CPU number is only used as a
> poor mans load balancing or device selection. If preemption
> happens during an encrypt/decrypt operation a small performance
> hit will occur but everything will continue to work, so just
> ignore it. This commit is similar to e7a9b05ca4
> ("crypto: cavium - Fix smp_processor_id() warnings").
>
> [ 7538.874350] BUG: using smp_processor_id() in preemptible [00000000] code: af_alg06/8438
> [ 7538.874368] caller is debug_smp_processor_id+0x1c/0x28
> [ 7538.874373] CPU: 50 PID: 8438 Comm: af_alg06 Kdump: loaded Not tainted 5.10.0.pc+ #18
> [ 7538.874377] Call trace:
> [ 7538.874387] dump_backtrace+0x0/0x210
> [ 7538.874389] show_stack+0x2c/0x38
> [ 7538.874392] dump_stack+0x110/0x164
> [ 7538.874394] check_preemption_disabled+0xf4/0x108
> [ 7538.874396] debug_smp_processor_id+0x1c/0x28
> [ 7538.874406] sec_create_qps+0x24/0xe8 [hisi_sec2]
> [ 7538.874408] sec_ctx_base_init+0x20/0x4d8 [hisi_sec2]
> [ 7538.874411] sec_aead_ctx_init+0x68/0x180 [hisi_sec2]
> [ 7538.874413] sec_aead_sha256_ctx_init+0x28/0x38 [hisi_sec2]
> [ 7538.874421] crypto_aead_init_tfm+0x54/0x68
> [ 7538.874423] crypto_create_tfm_node+0x6c/0x110
> [ 7538.874424] crypto_alloc_tfm_node+0x74/0x288
> [ 7538.874426] crypto_alloc_aead+0x40/0x50
> [ 7538.874431] aead_bind+0x50/0xd0
> [ 7538.874433] alg_bind+0x94/0x148
> [ 7538.874439] __sys_bind+0x98/0x118
> [ 7538.874441] __arm64_sys_bind+0x28/0x38
> [ 7538.874445] do_el0_svc+0x88/0x258
> [ 7538.874447] el0_svc+0x1c/0x28
> [ 7538.874449] el0_sync_handler+0x8c/0xb8
> [ 7538.874452] el0_sync+0x148/0x180
>
> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
> ---
> drivers/crypto/hisilicon/hpre/hpre_main.c | 2 +-
> drivers/crypto/hisilicon/sec2/sec_main.c | 2 +-
> drivers/crypto/hisilicon/zip/zip_main.c | 2 +-
> 3 files changed, 3 insertions(+), 3 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
prev parent reply other threads:[~2024-01-26 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 8:11 Wenkai Lin
2024-01-26 9:05 ` 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=ZbN128cDR4qisFha@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=acc@openeuler.org \
--cc=fanghao11@huawei.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linwenkai6@hisilicon.com \
--cc=liulongfang@huawei.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
all inboxes | Powered by JetHome®