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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YbOAtbjF2MdtPCRc@hirez.programming.kicks-ass.net>
Date:   Fri, 10 Dec 2021 17:30:45 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Linux PM <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] PM: runtime: Add safety net to supplier device release

On Fri, Dec 10, 2021 at 05:10:13PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Because refcount_dec_not_one() returns true if the target refcount
> becomes saturated, it is generally unsafe to use its return value as
> a loop termination condition, but that is what happens when a device
> link's supplier device is released during runtime PM suspend
> operations and on device link removal.
> 
> To address this, introduce pm_runtime_release_supplier() to be used
> in the above cases which will check the supplier device's runtime
> PM usage counter in addition to the refcount_dec_not_one() return
> value, so the loop can be terminated in case the rpm_active refcount
> value becomes invalid, and update the code in question to use it as
> appropriate.
> 
> This change is not expected to have any visible functional impact.
> 
> Reported-by: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Thanks!

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ