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]
Date: Wed, 31 Jan 2024 17:23:12 +0900
From: "hoyoung seo" <hy50.seo@...sung.com>
To: "'Bart Van Assche'" <bvanassche@....org>, <linux-scsi@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <alim.akhtar@...sung.com>,
	<avri.altman@....com>, <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>,
	<beanhuo@...ron.com>, <kwangwon.min@...sung.com>, <kwmad.kim@...sung.com>,
	<sh425.lee@...sung.com>, <sc.suh@...sung.com>, <quic_nguyenb@...cinc.com>,
	<cpgs@...sung.com>, <grant.jung@...sung.com>, <junwoo80.lee@...sung.com>
Subject: RE: [PATCH v1] scsi: ufs: core: Remove the ufshcd_release in
 ufshcd_err_handling_prepare

> -----Original Message-----
> From: Bart Van Assche <bvanassche@....org>
> Sent: Thursday, January 25, 2024 1:17 AM
> To: hoyoung seo <hy50.seo@...sung.com>; linux-scsi@...r.kernel.org; linux-
> kernel@...r.kernel.org; alim.akhtar@...sung.com; avri.altman@....com;
> jejb@...ux.ibm.com; martin.petersen@...cle.com; beanhuo@...ron.com;
> kwangwon.min@...sung.com; kwmad.kim@...sung.com; sh425.lee@...sung.com;
> sc.suh@...sung.com; quic_nguyenb@...cinc.com; cpgs@...sung.com;
> grant.jung@...sung.com; junwoo80.lee@...sung.com
> Subject: Re: [PATCH v1] scsi: ufs: core: Remove the ufshcd_release in
> ufshcd_err_handling_prepare
> 
> On 1/22/24 18:38, hoyoung seo wrote:
> > When err_handler is completed, active_reqs becomes negative because
> > ufshcd_release() is called again in ufshcd_err_handling_unprepare().
> > I tested it while printing the log, and if I misanalyzed it, let me know.
> 
> Please repeat your analysis. I think this patch is wrong.
> 
> Thanks,
> 
> Bart.

Hi,

I do not understand. why you said my patch is wrong.
If ufs entered suspend with hibern8 state then the hba->clk_gating.active_reqs is 1.
After that run wl_resume(), ufs drvier send hibern8 exit command.
At that time, if the command timeout or error occurs, the err_handler is activated. 
Then the active_reqs pair may not fit.

So to sum up, ufs_release() is performed 3 time.
(wl_resume(), ufshcd_err_handling_prepare(), ufshcd_err_handling_unprepare())
And the ufshcd_hold() is performed 2 time(__ufshcd_wl_suspend(), ufshcd_err_handling_prepare())
So the paire of active_reqs is not correct.
So I deleted the ufshcd_release() in ufshcd_err_handling_prepare().

The ufshcd_release() was not called again even in the pm_op_in_progress state in 4.xx version of the kernel.
But now if is_sys_suspended is 1, then ufshcd_release() is called once more.
I don't understand why this is added and the pair doesn't fit.

Please check it again.
Thanks.

Seo.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ