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:
 <SE1P216MB1303342A1994DEA4DF0F0280ED64A@SE1P216MB1303.KORP216.PROD.OUTLOOK.COM>
Date: Tue, 27 May 2025 05:04:10 +0000
From: jackson.lee <jackson.lee@...psnmedia.com>
To: Nicolas Dufresne <nicolas.dufresne@...labora.com>, "mchehab@...nel.org"
	<mchehab@...nel.org>, "hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
	"sebastian.fricke@...labora.com" <sebastian.fricke@...labora.com>,
	"bob.beckett@...labora.com" <bob.beckett@...labora.com>,
	"dafna.hirschfeld@...labora.com" <dafna.hirschfeld@...labora.com>
CC: "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, lafley.kim
	<lafley.kim@...psnmedia.com>, "b-brnich@...com" <b-brnich@...com>,
	"hverkuil@...all.nl" <hverkuil@...all.nl>, Nas Chung
	<nas.chung@...psnmedia.com>
Subject: RE: [PATCH v2 5/7] media: chips-media: wave5: Fix not to free
 resources normally when instance was destroyed

Hi Nicolas

> -----Original Message-----
> From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> Sent: Saturday, May 24, 2025 2:42 AM
> To: jackson.lee <jackson.lee@...psnmedia.com>; mchehab@...nel.org;
> hverkuil-cisco@...all.nl; sebastian.fricke@...labora.com;
> bob.beckett@...labora.com; dafna.hirschfeld@...labora.com
> Cc: linux-media@...r.kernel.org; linux-kernel@...r.kernel.org; lafley.kim
> <lafley.kim@...psnmedia.com>; b-brnich@...com; hverkuil@...all.nl; Nas
> Chung <nas.chung@...psnmedia.com>
> Subject: Re: [PATCH v2 5/7] media: chips-media: wave5: Fix not to free
> resources normally when instance was destroyed
> 
> Le jeudi 22 mai 2025 à 16:26 +0900, Jackson.lee a écrit :
> > From: Jackson Lee <jackson.lee@...psnmedia.com>
> >
> > Since applying performance patch, there was a problem not to free
> > resources, the root cause was that timeout sometimes happened after
> > calling the wave5_vpu_dec_finish_seq() when application was closed
> > forcibly,so if failure reason is WAVE5_SYSERR_VPU_STILL_RUNNING, the
> > wave5_vpu_dec_get_output_info() should be called to flush videos
> > decoded before closed.
> 
> Either squash, or try to bring before too.
> 

I will squash this patch to the performance patch.

Thanks
Jackson

> Nicolas
> 
> >
> > Signed-off-by: Jackson Lee <jackson.lee@...psnmedia.com>
> > Signed-off-by: Nas Chung <nas.chung@...psnmedia.com>
> > ---
> >  .../platform/chips-media/wave5/wave5-vpuapi.c | 20
> > +++++++++++++++++--
> >  1 file changed, 18 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
> > b/drivers/media/platform/chips-media/wave5/wave5-
> > vpuapi.c
> > index 68d86625538f..d7318d596b73 100644
> > --- a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
> > +++ b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
> > @@ -209,6 +209,7 @@ int wave5_vpu_dec_close(struct vpu_instance *inst,
> u32 *fail_res)
> >  	int i;
> >  	int inst_count = 0;
> >  	struct vpu_instance *inst_elm;
> > +	struct dec_output_info dec_info;
> >
> >  	*fail_res = 0;
> >  	if (!inst->codec_info)
> > @@ -229,11 +230,26 @@ int wave5_vpu_dec_close(struct vpu_instance *inst,
> u32 *fail_res)
> >  			goto unlock_and_return;
> >  		}
> >
> > -		if (*fail_res == WAVE5_SYSERR_VPU_STILL_RUNNING &&
> > -		    retry++ >= MAX_FIRMWARE_CALL_RETRY) {
> > +		if (ret == 0)
> > +			break;
> > +
> > +		if (*fail_res != WAVE5_SYSERR_VPU_STILL_RUNNING) {
> > +			dev_warn(inst->dev->dev, "dec_finish_seq timed out\n");
> > +			goto unlock_and_return;
> > +		}
> > +
> > +		if (retry++ >= MAX_FIRMWARE_CALL_RETRY) {
> >  			ret = -ETIMEDOUT;
> >  			goto unlock_and_return;
> >  		}
> > +
> > +		mutex_unlock(&vpu_dev->hw_lock);
> > +		wave5_vpu_dec_get_output_info(inst, &dec_info);
> > +		ret = mutex_lock_interruptible(&vpu_dev->hw_lock);
> > +		if (ret) {
> > +			pm_runtime_put_sync(inst->dev->dev);
> > +			return ret;
> > +		}
> >  	} while (ret != 0);
> >
> >  	dev_dbg(inst->dev->dev, "%s: dec_finish_seq complete\n", __func__);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ