mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	QAT: Fix uninitialized seed in QAT compression
CpaDcRqResults have to be initialized with checksum=1 for adler32. Otherwise when error CPA_DC_OVERFLOW occurred, the next compress operation will continue on previously part-compressed data, and write invalid checksum data. When zfs decompress the compressed data, a invalid checksum will occurred and lead to #14463 Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Weigang Li <weigang.li@intel.com> Reviewed-by: Chengfei Zhu <chengfeix.zhu@intel.com> Signed-off-by: naivekun <naivekun0817@gmail.com> Closes #14632 Closes #14463
This commit is contained in:
		
							parent
							
								
									a5c469c5f3
								
							
						
					
					
						commit
						345f8beb58
					
				| @ -247,7 +247,7 @@ qat_compress_impl(qat_compress_dir_t dir, char *src, int src_len, | |||||||
| 	Cpa8U *buffer_meta_src = NULL; | 	Cpa8U *buffer_meta_src = NULL; | ||||||
| 	Cpa8U *buffer_meta_dst = NULL; | 	Cpa8U *buffer_meta_dst = NULL; | ||||||
| 	Cpa32U buffer_meta_size = 0; | 	Cpa32U buffer_meta_size = 0; | ||||||
| 	CpaDcRqResults dc_results; | 	CpaDcRqResults dc_results = {.checksum = 1}; | ||||||
| 	CpaStatus status = CPA_STATUS_FAIL; | 	CpaStatus status = CPA_STATUS_FAIL; | ||||||
| 	Cpa32U hdr_sz = 0; | 	Cpa32U hdr_sz = 0; | ||||||
| 	Cpa32U compressed_sz; | 	Cpa32U compressed_sz; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 naivekun
						naivekun