lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a482d0a3-92da-998a-97a7-ccb010aa6bf9@quicinc.com>
Date: Wed, 13 Aug 2025 17:46:33 +0530
From: Dikshita Agarwal <quic_dikshita@...cinc.com>
To: Jorge Ramirez <jorge.ramirez@....qualcomm.com>
CC: Vikash Garodia <quic_vgarodia@...cinc.com>,
        Abhinav Kumar
	<abhinav.kumar@...ux.dev>,
        Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil
	<hverkuil@...all.nl>,
        Stefan Schmidt <stefan.schmidt@...aro.org>,
        "Vedang
 Nagar" <quic_vnagar@...cinc.com>,
        <linux-media@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Renjiang Han
	<quic_renjiang@...cinc.com>,
        Wangao Wang <quic_wangaow@...cinc.com>
Subject: Re: [PATCH v2 02/24] media: iris: Report unreleased PERSIST buffers
 on session close



On 8/13/2025 4:23 PM, Jorge Ramirez wrote:
> On 13/08/25 15:07:52, Dikshita Agarwal wrote:
>> Add error reporting for unreleased PERSIST internal buffers in
>> iris_check_num_queued_internal_buffers(). This ensures all buffer types
>> are checked and logged if not freed during session close, helping to
>> detect memory leaks and improve driver robustness. No change to buffer
>> lifecycle or allocation logic.
>>
>> Fixes: d2abb1ff5a3c ("media: iris: Verify internal buffer release on close")
>> Reviewed-by: Vikash Garodia <quic_vgarodia@...cinc.com>
>> Tested-by: Vikash Garodia <quic_vgarodia@...cinc.com> # X1E80100
>> Signed-off-by: Dikshita Agarwal <quic_dikshita@...cinc.com>
>> ---
>>  drivers/media/platform/qcom/iris/iris_vidc.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/platform/qcom/iris/iris_vidc.c
>> index 8285bdaf9466d4bea0f89a3b1943ed7d6c014b7d..96313856a026efaff40da97eaaa63e847172cd57 100644
>> --- a/drivers/media/platform/qcom/iris/iris_vidc.c
>> +++ b/drivers/media/platform/qcom/iris/iris_vidc.c
>> @@ -247,6 +247,14 @@ static void iris_check_num_queued_internal_buffers(struct iris_inst *inst, u32 p
>>  			dev_err(inst->core->dev, "%d buffer of type %d not released",
>>  				count, internal_buf_type[i]);
>>  	}
>> +
>> +	buffers = &inst->buffers[BUF_PERSIST];
>> +
>> +	count = 0;
>> +	list_for_each_entry_safe(buf, next, &buffers->list, list)
>> +		count++;
> 
> I believe at this point is not safe to dereference buf
You are right, I fixed it in later patch, but it should be fixed in this
patch instead. Will make the change.

Thanks,
Dikshita
> 
>> +	if (count)
>> +		dev_err(inst->core->dev, "%d buffer of type %d not released", count, buf->type);
>>  }
>>  
>>  int iris_close(struct file *filp)
>>
>> -- 
>> 2.34.1
>>
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ