]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init()
authorThomas Fourier <fourier.thomas@gmail.com>
Fri, 13 Feb 2026 09:13:27 +0000 (10:13 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 27 Apr 2026 06:41:21 +0000 (08:41 +0200)
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.

Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Fixes: d7378f84e94e ("media: iris: introduce iris core state management with shared queues")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/qcom/iris/iris_hfi_queue.c

index b3ed06297953b902d5ea6c452385a88d5431ac66..bf6db23b53e2106c08f2139b643f8626af8bc40a 100644 (file)
@@ -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;
        }