* [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size
@ 2026-01-12 13:43 Thomas Fourier
2026-01-12 14:12 ` Markus Elfring
2026-01-24 3:53 ` Martin K. Petersen
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Fourier @ 2026-01-12 13:43 UTC (permalink / raw)
Cc: Thomas Fourier, stable, Nilesh Javali,
GR-QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, Duane Grigsby, Hannes Reinecke, Quinn Tran,
Larry Wisneski, linux-scsi, linux-kernel
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>
---
drivers/scsi/qla2xxx/qla_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 16a44c0917e1..e939bc88e151 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -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:
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size
2026-01-12 13:43 [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size Thomas Fourier
@ 2026-01-12 14:12 ` Markus Elfring
2026-01-12 15:01 ` Greg KH
2026-01-24 3:53 ` Martin K. Petersen
1 sibling, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2026-01-12 14:12 UTC (permalink / raw)
To: Thomas Fourier, linux-scsi, GR-QLogic-Storage-Upstream,
Duane Grigsby, Hannes Reinecke, James Bottomley, Larry Wisneski,
Martin K. Petersen, Nilesh Javali, Quinn Tran
Cc: stable, LKML
> 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.
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”.
…
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size
2026-01-12 14:12 ` Markus Elfring
@ 2026-01-12 15:01 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-01-12 15:01 UTC (permalink / raw)
To: Markus Elfring
Cc: Thomas Fourier, linux-scsi, GR-QLogic-Storage-Upstream,
Duane Grigsby, Hannes Reinecke, James Bottomley, Larry Wisneski,
Martin K. Petersen, Nilesh Javali, Quinn Tran, stable, LKML
On Mon, Jan 12, 2026 at 03:12:54PM +0100, Markus Elfring wrote:
> > 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.
>
> 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”.
>
>
> …
> > +++ b/drivers/scsi/qla2xxx/qla_os.c
> > @@ -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
>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size
2026-01-12 13:43 [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size Thomas Fourier
2026-01-12 14:12 ` Markus Elfring
@ 2026-01-24 3:53 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2026-01-24 3:53 UTC (permalink / raw)
To: Thomas Fourier
Cc: Martin K . Petersen, stable, Nilesh Javali,
GR-QLogic-Storage-Upstream, James E.J. Bottomley, Duane Grigsby,
Hannes Reinecke, Quinn Tran, Larry Wisneski, linux-scsi,
linux-kernel
On Mon, 12 Jan 2026 14:43:24 +0100, Thomas Fourier wrote:
> 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.
>
>
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
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-24 3:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12 13:43 [PATCH] scsi: qla2xxx: edif: Fix dma_free_coherent() size Thomas Fourier
2026-01-12 14:12 ` Markus Elfring
2026-01-12 15:01 ` Greg KH
2026-01-24 3:53 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®