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

2017-01-28 Thread Douglas Miller
s to make the tryget routines use an actual boolean internally instead of the atomic long result truncated to a int. Fixes: e625305b3907 percpu-refcount: make percpu_ref based on longs instead of ints Link: https://bugzilla.kernel.org/show_bug.cgi?id=190751 Signed-off-by: Douglas Miller <doug

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

2017-01-28 Thread Douglas Miller
s to make the tryget routines use an actual boolean internally instead of the atomic long result truncated to a int. Fixes: e625305b3907 percpu-refcount: make percpu_ref based on longs instead of ints Link: https://bugzilla.kernel.org/show_bug.cgi?id=190751 Signed-off-by: Douglas Miller ---

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

2017-01-27 Thread Douglas Miller
s to make the tryget routines return an actual boolean instead of the atomic long result truncated to a bool. Fixes: e625305b3907 percpu-refcount: make percpu_ref based on longs instead of ints Link: https://bugzilla.kernel.org/show_bug.cgi?id=190751 Signed-off-by: Douglas Miller <dougm...@linux

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

2017-01-27 Thread Douglas Miller
s to make the tryget routines return an actual boolean instead of the atomic long result truncated to a bool. Fixes: e625305b3907 percpu-refcount: make percpu_ref based on longs instead of ints Link: https://bugzilla.kernel.org/show_bug.cgi?id=190751 Signed-off-by: Douglas Miller Reviewed-by: Jens

[PATCH V2 0/1] percpu-refcount: fix reference leak during percpu-atomic transition

2017-01-27 Thread Douglas Miller
Removed extraneous parentheses. Did not switch to "bool" as that would necessitate more testing and raises the question whether other platforms might have a different definition for "bool" that would not fix this problem.

[PATCH V2 0/1] percpu-refcount: fix reference leak during percpu-atomic transition

2017-01-27 Thread Douglas Miller
Removed extraneous parentheses. Did not switch to "bool" as that would necessitate more testing and raises the question whether other platforms might have a different definition for "bool" that would not fix this problem.

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

2017-01-27 Thread Douglas Miller
I will re-test and post the patch using "bool" when finished. On 01/27/2017 06:13 PM, Tejun Heo wrote: On Fri, Jan 27, 2017 at 05:32:15PM -0600, Douglas Miller wrote: Removed extraneous parentheses. Did not switch to "bool" as that would necessitate more testing and

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

2017-01-27 Thread Douglas Miller
I will re-test and post the patch using "bool" when finished. On 01/27/2017 06:13 PM, Tejun Heo wrote: On Fri, Jan 27, 2017 at 05:32:15PM -0600, Douglas Miller wrote: Removed extraneous parentheses. Did not switch to "bool" as that would necessitate more testing and

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

2017-01-27 Thread Douglas Miller
I'd like to request this be flagged for "stable". Thanks, Doug On 01/27/2017 02:59 PM, 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 lo

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

2017-01-27 Thread Douglas Miller
I'd like to request this be flagged for "stable". Thanks, Doug On 01/27/2017 02:59 PM, 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 lo

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

2017-01-27 Thread Douglas Miller
s to make the tryget routines return an actual boolean instead of the atomic long result truncated to a bool. Fixes: e625305b3907 percpu-refcount: make percpu_ref based on longs instead of ints Link: https://bugzilla.kernel.org/show_bug.cgi?id=190751 Signed-off-by: Douglas Miller <doug

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

2017-01-27 Thread Douglas Miller
s to make the tryget routines return an actual boolean instead of the atomic long result truncated to a bool. Fixes: e625305b3907 percpu-refcount: make percpu_ref based on longs instead of ints Link: https://bugzilla.kernel.org/show_bug.cgi?id=190751 Signed-off-by: Douglas Miller --- include/lin