Loading
crypto: iaa - Fix nr_cpus < nr_iaa case
mainline inclusion from mainline-v6.9-rc2 commit 5a7e89d3315d1be86aff8a8bf849023cda6547f7 category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I9TA1S CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5a7e89d3315d1be86aff8a8bf849023cda6547f7 -------------------------------- 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. Intel-SIG: commit 5a7e89d3315d crypto: iaa - Fix nr_cpus < nr_iaa case. Backporting patches for Intel IAA crypto driver on Intel Xeon platform. Cc: <stable@vger.kernel.org> # v6.8+ Reported-by:Jerry Snitselaar <jsnitsel@redhat.com> Signed-off-by:
Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by:
Xiaochen Shen <xiaochen.shen@intel.com>