Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1568897 > unrolled thread

Re: [PATCH V3 1/1] percpu-refcount: fix reference leak during percpu-atomic transition

Started byTejun Heo <tj@kernel.org>
First post2017-01-28 14:30 +0100
Last post2017-01-28 14:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V3 1/1] percpu-refcount: fix reference leak during  percpu-atomic transition Tejun Heo <tj@kernel.org> - 2017-01-28 14:30 +0100

#1568897 — Re: [PATCH V3 1/1] percpu-refcount: fix reference leak during percpu-atomic transition

FromTejun Heo <tj@kernel.org>
Date2017-01-28 14:30 +0100
SubjectRe: [PATCH V3 1/1] percpu-refcount: fix reference leak during percpu-atomic transition
Message-ID<t4BeO-1ZD-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web