Skip to content

Commit 56bd3c0

Browse files
Thomas-fouriermartinkpetersen
authored andcommitted
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: 84318a9 ("scsi: qla2xxx: edif: Add send, receive, and accept for auth_els") Cc: stable@vger.kernel.org Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Link: https://patch.msgid.link/20260112134326.55466-2-fourier.thomas@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 19bc5f2 commit 56bd3c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4489,7 +4489,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
44894489
fail_elsrej:
44904490
dma_pool_destroy(ha->purex_dma_pool);
44914491
fail_flt:
4492-
dma_free_coherent(&ha->pdev->dev, SFP_DEV_SIZE,
4492+
dma_free_coherent(&ha->pdev->dev, sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE,
44934493
ha->flt, ha->flt_dma);
44944494

44954495
fail_flt_buffer:

0 commit comments

Comments
 (0)