* [PATCH] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init()
@ 2026-02-13 9:13 Thomas Fourier
2026-02-13 9:40 ` Dikshita Agarwal
2026-02-14 13:15 ` Markus Elfring
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Fourier @ 2026-02-13 9:13 UTC (permalink / raw)
Cc: Thomas Fourier, stable, Vikash Garodia, Dikshita Agarwal,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Hans Verkuil, Stefan Schmidt, linux-media, linux-arm-msm,
linux-kernel
The core->iface_q_table_vaddr buffer is alloc'd with size queue_size
but freed with sizeof(*q_tbl_hdr) which is different.
Change the dma_free_attrs() size.
Fixes: d7378f84e94e ("media: iris: introduce iris core state management with shared queues")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/media/platform/qcom/iris/iris_hfi_queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
index b3ed06297953..bf6db23b53e2 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
@@ -263,7 +263,7 @@ int iris_hfi_queues_init(struct iris_core *core)
GFP_KERNEL, DMA_ATTR_WRITE_COMBINE);
if (!core->sfr_vaddr) {
dev_err(core->dev, "sfr alloc and map failed\n");
- dma_free_attrs(core->dev, sizeof(*q_tbl_hdr), core->iface_q_table_vaddr,
+ dma_free_attrs(core->dev, queue_size, core->iface_q_table_vaddr,
core->iface_q_table_daddr, DMA_ATTR_WRITE_COMBINE);
return -ENOMEM;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init()
2026-02-13 9:13 [PATCH] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init() Thomas Fourier
@ 2026-02-13 9:40 ` Dikshita Agarwal
2026-02-14 13:15 ` Markus Elfring
1 sibling, 0 replies; 3+ messages in thread
From: Dikshita Agarwal @ 2026-02-13 9:40 UTC (permalink / raw)
To: Thomas Fourier
Cc: stable, Vikash Garodia, Abhinav Kumar, Bryan O'Donoghue,
Mauro Carvalho Chehab, Hans Verkuil, Stefan Schmidt, linux-media,
linux-arm-msm, linux-kernel
On 2/13/2026 2:43 PM, Thomas Fourier wrote:
> The core->iface_q_table_vaddr buffer is alloc'd with size queue_size
> but freed with sizeof(*q_tbl_hdr) which is different.
>
> Change the dma_free_attrs() size.
>
> Fixes: d7378f84e94e ("media: iris: introduce iris core state management with shared queues")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
> drivers/media/platform/qcom/iris/iris_hfi_queue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> index b3ed06297953..bf6db23b53e2 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> @@ -263,7 +263,7 @@ int iris_hfi_queues_init(struct iris_core *core)
> GFP_KERNEL, DMA_ATTR_WRITE_COMBINE);
> if (!core->sfr_vaddr) {
> dev_err(core->dev, "sfr alloc and map failed\n");
> - dma_free_attrs(core->dev, sizeof(*q_tbl_hdr), core->iface_q_table_vaddr,
> + dma_free_attrs(core->dev, queue_size, core->iface_q_table_vaddr,
> core->iface_q_table_daddr, DMA_ATTR_WRITE_COMBINE);
> return -ENOMEM;
> }
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init()
2026-02-13 9:13 [PATCH] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init() Thomas Fourier
2026-02-13 9:40 ` Dikshita Agarwal
@ 2026-02-14 13:15 ` Markus Elfring
1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2026-02-14 13:15 UTC (permalink / raw)
To: Thomas Fourier, linux-media, linux-arm-msm
Cc: stable, LKML, Abhinav Kumar, Bryan O'Donoghue,
Dikshita Agarwal, Hans Verkuil, Mauro Carvalho Chehab,
Stefan Schmidt, Vikash Garodia
> The core->iface_q_table_vaddr buffer is alloc'd with size queue_size
> but freed with sizeof(*q_tbl_hdr) which is different.
…
* Were any source code analysis tools involved here?
* You should probably specify message recipients not only in the header field “Cc”.
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-14 13:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-13 9:13 [PATCH] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init() Thomas Fourier
2026-02-13 9:40 ` Dikshita Agarwal
2026-02-14 13:15 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox