Commit 56bd3c0f authored by Thomas Fourier's avatar Thomas Fourier Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: edif: Fix dma_free_coherent() size



Earlier in the function, the ha->flt buffer is allocated with size
sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE but freed in the error
path with size SFP_DEV_SIZE.

Fixes: 84318a9f ("scsi: qla2xxx: edif: Add send, receive, and accept for auth_els")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarThomas Fourier <fourier.thomas@gmail.com>
Link: https://patch.msgid.link/20260112134326.55466-2-fourier.thomas@gmail.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 19bc5f2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4489,7 +4489,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
fail_elsrej:
	dma_pool_destroy(ha->purex_dma_pool);
fail_flt:
	dma_free_coherent(&ha->pdev->dev, SFP_DEV_SIZE,
	dma_free_coherent(&ha->pdev->dev, sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE,
	    ha->flt, ha->flt_dma);

fail_flt_buffer: