[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <811cd70e-dc27-4ce0-b7da-296fa5926f90@linaro.org>
Date: Fri, 11 Apr 2025 13:10:39 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Dikshita Agarwal <quic_dikshita@...cinc.com>,
Vikash Garodia <quic_vgarodia@...cinc.com>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Stefan Schmidt <stefan.schmidt@...aro.org>, Hans Verkuil
<hverkuil@...all.nl>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Neil Armstrong <neil.armstrong@...aro.org>, linux-media@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 01/20] media: iris: Skip destroying internal buffer if not
dequeued
On 08/04/2025 16:54, Dikshita Agarwal wrote:
> Firmware might hold the DPB buffers for reference in case of sequence
> change, so skip destroying buffers for which QUEUED flag is not removed.
>
> Cc: stable@...r.kernel.org
> Fixes: 73702f45db81 ("media: iris: allocate, initialize and queue internal buffers")
> Signed-off-by: Dikshita Agarwal <quic_dikshita@...cinc.com>
> ---
> drivers/media/platform/qcom/iris/iris_buffer.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_buffer.c b/drivers/media/platform/qcom/iris/iris_buffer.c
> index e5c5a564fcb8..75fe63cc2327 100644
> --- a/drivers/media/platform/qcom/iris/iris_buffer.c
> +++ b/drivers/media/platform/qcom/iris/iris_buffer.c
> @@ -396,6 +396,13 @@ int iris_destroy_internal_buffers(struct iris_inst *inst, u32 plane)
> for (i = 0; i < len; i++) {
> buffers = &inst->buffers[internal_buf_type[i]];
> list_for_each_entry_safe(buf, next, &buffers->list, list) {
> + /*
> + * skip destroying internal(DPB) buffer if firmware
> + * did not return it.
> + */
> + if (buf->attr & BUF_ATTR_QUEUED)
> + continue;
> +
> ret = iris_destroy_internal_buffer(inst, buf);
> if (ret)
> return ret;
>
iris_destroy_internal_buffers() is called from
- iris_vdec_streamon_output
- iris_venc_streamon_output
- iris_close
So if we skip releasing the buffer here, when will the memory be released ?
Particularly the kfree() in iris_destroy_internal_buffer() ?
iris_close -> iris_destroy_internal_buffers ! -> iris_destroy_buffer
Is a leak right ?
---
bod
Powered by blists - more mailing lists