From: Herbert Xu <herbert@gondor.apana.org.au>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: davem@davemloft.net, jsnitsel@redhat.com,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH 1/2] crypto: iaa - Fix nr_cpus < nr_iaa case
Date: Fri, 22 Mar 2024 19:44:50 +0800 [thread overview]
Message-ID: <Zf1vMuXMF7mUuDAK@gondor.apana.org.au> (raw)
In-Reply-To: <20240321210846.1307596-2-tom.zanussi@linux.intel.com>
On Thu, Mar 21, 2024 at 04:08:45PM -0500, Tom Zanussi wrote:
> If nr_cpus < nr_iaa, the calculated cpus_per_iaa will be 0, which
> causes a divide-by-0 in rebalance_wq_table().
>
> Make sure cpus_per_iaa is 1 in that case, and also in the nr_iaa == 0
> case, even though cpus_per_iaa is never used if nr_iaa == 0, for
> paranoia.
>
> Reported-by: Jerry Snitselaar <jsnitsel@redhat.com>
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
> drivers/crypto/intel/iaa/iaa_crypto_main.c | 10 +++++++---
> 1 file changed, 7 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
next prev parent reply other threads:[~2024-03-22 11:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 21:08 [PATCH 0/2] crypto: iaa - A couple of bugfixes Tom Zanussi
2024-03-21 21:08 ` [PATCH 1/2] crypto: iaa - Fix nr_cpus < nr_iaa case Tom Zanussi
2024-03-22 11:44 ` Herbert Xu [this message]
2024-03-21 21:08 ` [PATCH 2/2] crypto: iaa: Fix some errors in IAA documentation Tom Zanussi
2024-03-28 10:57 ` 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=Zf1vMuXMF7mUuDAK@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=jsnitsel@redhat.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.zanussi@linux.intel.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®