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:   Fri, 24 Mar 2017 18:04:59 -0600
From:   Shuah Khan <shuahkh@....samsung.com>
To:     balbi@...nel.org, gregkh@...uxfoundation.org, kgene@...nel.org,
        krzk@...nel.org, javier@....samsung.com
Cc:     Shuah Khan <shuahkh@....samsung.com>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-omap@...r.kernel.org
Subject: [PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails

dwc3_probe() does pm_runtime_put_sync() in its err1 handling when
pm_runtime_get_sync() fails.  Move the pm_runtime_put_sync() under
err2 instead as it is used in error paths after pm_runtime_get_sync()
succeeds.

Signed-off-by: Shuah Khan <shuahkh@....samsung.com>
---
 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 56f1367..0fc7bef 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1162,9 +1162,9 @@ static int dwc3_probe(struct platform_device *pdev)
 
 err2:
 	pm_runtime_allow(&pdev->dev);
+	pm_runtime_put_sync(&pdev->dev);
 
 err1:
-	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 err0:
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ