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: <87mvc923pe.fsf@linux.intel.com>
Date:   Sat, 25 Mar 2017 09:52:29 +0200
From:   Felipe Balbi <balbi@...nel.org>
To:     Shuah Khan <shuahkh@....samsung.com>, 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: Re: [PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails


Hi,

Shuah Khan <shuahkh@....samsung.com> writes:
> 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.

there's nothing wrong with current code. Read the docs. Even if
pm_runtime_get*() fails, you still need to decrement the usage
counter. pm_runtime_put*() is one way of achieving so.

-- 
balbi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ