]> granicus.if.org Git - zfs/commitdiff
Change U16 to U32 due to atomic_inc_32_nv
authorwli5 <weigang.li@intel.com>
Wed, 26 Apr 2017 00:41:58 +0000 (08:41 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 26 Apr 2017 00:41:58 +0000 (17:41 -0700)
After run a long time with QAT compression, the variable "inst_num"
is overflow by "atomic_inc_32_nv", which causes its neighbor
variable overwritten. Change its definition from U16 to U32.

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

module/zfs/qat_compress.c

index a350c0f3e93b6375ab476ee337ee19dc51e27d50..99d1c9a12d6fc0032ff17cf6ce3fd0c549c45128 100644 (file)
@@ -104,8 +104,8 @@ static kstat_t *qat_ksp;
 static CpaInstanceHandle dc_inst_handles[MAX_INSTANCES];
 static CpaDcSessionHandle session_handles[MAX_INSTANCES];
 static CpaBufferList **buffer_array[MAX_INSTANCES];
-static Cpa16U num_inst = 0;
-static Cpa16U inst_num = 0;
+static Cpa32U num_inst = 0;
+static Cpa32U inst_num = 0;
 static boolean_t qat_init_done = B_FALSE;
 int zfs_qat_disable = 0;