HomeFreeBSD

Fix inst_num overflow in qat_crypt.c

Description

Fix inst_num overflow in qat_crypt.c

This patch fixes the same issue which was previously addressed in

  1. The variable "inst_num" was of the incorrect type and

"atomic_inc_32_nv()" could cause an overflow damaging its neighbor.

Cast the return value of atomic_inc_32_nv() to Cpa32U.

Fix a few types for num_inst for clarity.

Reviewed-by: Weigang Li <weigang.li@intel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7468

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on May 2 2018, 3:44 AM
GitHub <noreply@github.com>Committed on May 2 2018, 3:44 AM
Parents
rG2c24b5b14876: Fix issues found with zfs diff
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGbc8a6a60e9f0: Fix inst_num overflow in qat_crypt.c (authored by Brian Behlendorf <behlendorf1@llnl.gov>).May 2 2018, 3:44 AM