[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170128125251.GA5797@mtj.duckdns.org>
Date: Sat, 28 Jan 2017 07:52:51 -0500
From: Tejun Heo <tj@...nel.org>
To: Douglas Miller <dougmill@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, Christoph Lameter <cl@...ux.com>,
linux-block@...r.kernel.org, stable@...r.kernel.org,
Guilherme Piccoli <gpiccoli@...ibm.com>
Subject: Re: [PATCH V3 1/1] percpu-refcount: fix reference leak during
percpu-atomic transition
On Sat, Jan 28, 2017 at 06:42:20AM -0600, Douglas Miller wrote:
> percpu_ref_tryget() and percpu_ref_tryget_live() should return
> "true" IFF they acquire a reference. But the return value from
> atomic_long_inc_not_zero() is a long and may have high bits set,
> e.g. PERCPU_COUNT_BIAS, and the return value of the tryget routines
> is bool so the reference may actually be acquired but the routines
> return "false" which results in a reference leak since the caller
> assumes it does not need to do a corresponding percpu_ref_put().
Applied to percpu/for-4.10-fixes w/ stable cc'd.
Thanks!
--
tejun
Powered by blists - more mailing lists