]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: qla2xxx: edif: Fix dma_free_coherent() size
authorThomas Fourier <fourier.thomas@gmail.com>
Mon, 12 Jan 2026 13:43:24 +0000 (14:43 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 24 Jan 2026 03:31:56 +0000 (22:31 -0500)
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: 84318a9f01ce ("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>
drivers/scsi/qla2xxx/qla_os.c

index 16a44c0917e18ba264b4011b555de827ef7843db..e939bc88e151971bc4f1bc5e2f620595b9ef3478 100644 (file)
@@ -4489,7 +4489,7 @@ fail_lsrjt:
 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: