scsi: qla2xxx: edif: Fix dma_free_coherent() size
Subsystems (3)
PATCH 1/1 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.
--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -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:
Signature · 1 line
2.43.0
Quoted 3 lines
Earlier in the function, the
ha->fltbuffer is allocated with sizesizeof(struct qla_flt_header)+FLT_REGIONS_SIZEbut freed in the error path with sizeSFP_DEV_SIZE.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc4#n94
You should probably not only specify message recipients in the header field “Cc”.
…
drivers/scsi/qla2xxx/qla_os.c qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, · line 4493
Quoted 8 lines
+++
b/drivers/scsi/qla2xxx/qla_os.cdrivers/scsi/qla2xxx/qla_os.c +1
-1@@ -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);
…
How do you think about to adjust the indentation another bit for the passed parameters?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19-rc4#n110
Regards,
Markus
Greg KH
maintainerQuoted 22 lines · Markus Elfring
Quoted 3 lines
Earlier in the function, the
ha->fltbuffer is allocated with sizesizeof(struct qla_flt_header)+FLT_REGIONS_SIZEbut freed in the error path with sizeSFP_DEV_SIZE.See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc4#n94You should probably not only specify message recipients in the header field “Cc”.
…
Quoted 8 lines
+++
b/drivers/scsi/qla2xxx/qla_os.cdrivers/scsi/qla2xxx/qla_os.c +1
-1@@ -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);…
Quoted 6 lines
How do you think about to adjust the indentation another bit for the passed parameters?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19-rc4#n110Regards,
Markus
Hi,
This is the semi-friendly patch-bot of Greg Kroah-Hartman.
Markus, you seem to have sent a nonsensical or otherwise pointless review comment to a patch submission on a Linux kernel developer mailing list. I strongly suggest that you not do this anymore. Please do not bother developers who are actively working to produce patches and features with comments that, in the end, are a waste of time.
Patch submitter, please ignore Markus's suggestion; you do not need to follow it at all. The person/bot/AI that sent it is being ignored by almost all Linux kernel maintainers for having a persistent pattern of behavior of producing distracting and pointless commentary, and inability to adapt to feedback. Please feel free to also ignore emails from them.
thanks,
greg k-h's patch email bot
Martin K. Petersen
AppliedQuoted 5 lines · Thomas Fourier
Earlier in the function, the
ha->fltbuffer is allocated with sizesizeof(struct qla_flt_header)+FLT_REGIONS_SIZEbut freed in the error path with sizeSFP_DEV_SIZE.
Applied to 6.19/scsi-fixes, thanks!
[1/1] scsi: qla2xxx: edif: Fix dma_free_coherent() size
https://git.kernel.org/mkp/scsi/c/56bd3c0f749f
Signature · 1 line
Martin K. Petersen