From: Tejun Heo <tj@kernel.org>
To: Douglas Miller <dougmill@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, Christoph Lameter <cl@linux.com>,
linux-block@vger.kernel.org, stable@vger.kernel.org,
Guilherme Piccoli <gpiccoli@br.ibm.com>
Subject: Re: [PATCH V3 1/1] percpu-refcount: fix reference leak during percpu-atomic transition
Date: Sat, 28 Jan 2017 07:52:51 -0500 [thread overview]
Message-ID: <20170128125251.GA5797@mtj.duckdns.org> (raw)
In-Reply-To: <1485607340-13728-1-git-send-email-dougmill@linux.vnet.ibm.com>
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
next prev parent reply other threads:[~2017-01-28 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-28 12:42 [PATCH V3 1/1] percpu-refcount: fix reference leak during percpu-atomic transition Douglas Miller
2017-01-28 12:52 ` Tejun Heo [this message]
2017-01-30 16:04 ` Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170128125251.GA5797@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=cl@linux.com \
--cc=dougmill@linux.vnet.ibm.com \
--cc=gpiccoli@br.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).