diff options
author | wli5 <[email protected]> | 2017-04-26 08:41:58 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-04-25 17:41:58 -0700 |
commit | 7a25f0891eef4adbe00dd03e26b6128dc99e170d (patch) | |
tree | 45fa06e61ff1786cd6b5e8a23151987fc0e8a577 | |
parent | 603a1784792f61e79f8b53d707a46d99cfc927e6 (diff) |
Change U16 to U32 due to atomic_inc_32_nv
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 <[email protected]>
Signed-off-by: Weigang Li <[email protected]>
Closes #6051
-rw-r--r-- | module/zfs/qat_compress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/qat_compress.c b/module/zfs/qat_compress.c index a350c0f3e..99d1c9a12 100644 --- a/module/zfs/qat_compress.c +++ b/module/zfs/qat_compress.c @@ -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; |