Re: [PATCH] crypto: iaa - Use cpumask_weight() when rebalancing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 05, 2024 at 01:57:30PM -0500, Tom Zanussi wrote:
> If some cpus are offlined, or if the node mask is smaller than
> expected, the 'nonexistent cpu' warning in rebalance_wq_table() may be
> erroneously triggered.
> 
> Use cpumask_weight() to make sure we only iterate over the exact
> number of cpus in the mask.
> 
> Also use num_possible_cpus() instead of num_online_cpus() to make sure
> all slots in the wq table are initialized.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>
> ---
>  drivers/crypto/intel/iaa/iaa_crypto_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux