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] [day] [month] [year] [list]
Date:   Tue, 7 Jul 2020 10:13:52 +0800 (GMT+08:00)
From:   dinghao.liu@....edu.cn
To:     "Lorenzo Pieralisi" <lorenzo.pieralisi@....com>
Cc:     kjlu@....edu, "Andy Gross" <agross@...nel.org>,
        "Bjorn Andersson" <bjorn.andersson@...aro.org>,
        "Stanimir Varbanov" <svarbanov@...sol.com>,
        "Rob Herring" <robh@...nel.org>,
        "Bjorn Helgaas" <bhelgaas@...gle.com>,
        linux-arm-msm@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH] PCI: qcom: fix runtime pm imbalance on error

> > pm_runtime_get_sync() increments the runtime PM usage counter even
> > it returns an error code. Thus a pairing decrement is needed on
> > the error handling path to keep the counter balanced.
> > 
> > Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> > ---
> >  drivers/pci/controller/dwc/pcie-qcom.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> > index 138e1a2d21cc..35686930df1d 100644
> > --- a/drivers/pci/controller/dwc/pcie-qcom.c
> > +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> > @@ -1340,8 +1340,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
> >  	pm_runtime_enable(dev);
> >  	ret = pm_runtime_get_sync(dev);
> >  	if (ret < 0) {
> > -		pm_runtime_disable(dev);
> > -		return ret;
> > +		goto err_pm_runtime_put;
> 
> I think you need to remove the brackets - this become a single line
> if statement.
> 

Thank you for your advice! I will fix this in the next version of patch.

Regards,
Dinghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ