Re: [lttng-dev] [PATCH lttng-modules] Fix: use of uninitialized ret value in lttng_abi_open_metadata_stream

2017-03-08 Thread Mathieu Desnoyers
merged into master, 2.9, 2.8, thanks! Mathieu - On Mar 8, 2017, at 2:32 PM, Francis Deslauriers francis.deslauri...@efficios.com wrote: > Fixes the following compiler warning: > > lttng-abi.c: In function ‘lttng_metadata_ioctl’: > lttng-abi.c:971:6: warning: ‘ret’ may be used uninitialized

[lttng-dev] [PATCH lttng-modules] Fix: use of uninitialized ret value in lttng_abi_open_metadata_stream

2017-03-08 Thread Francis Deslauriers
Fixes the following compiler warning: lttng-abi.c: In function ‘lttng_metadata_ioctl’: lttng-abi.c:971:6: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] int ret; ^ Signed-off-by: Francis Deslauriers --- lttng-abi.c | 5 - 1 file changed, 4 inserti

Re: [lttng-dev] [PATCH lttng-modules] Fix: kref changes for kernel 4.11

2017-03-08 Thread Mathieu Desnoyers
- On Mar 7, 2017, at 11:37 PM, Francis Deslauriers francis.deslauri...@efficios.com wrote: > The underlying type of `struct kref` changed in kernel 4.11 from an > atomic_t to a refcount_t. This change was introduced in kernel > commit:10383ae. This commit also added a builtin overflow check

Re: [lttng-dev] [PATCH lttng-modules v3] Fix: atomic_add_unless() returns true/false rather than prior value

2017-03-08 Thread Mathieu Desnoyers
merged into master, 2.9, 2.8, thanks! Mathieu - On Mar 8, 2017, at 11:50 AM, Francis Deslauriers francis.deslauri...@efficios.com wrote: > The previous implementation assumed that `atomic_add_unless` returned > the prior value of the atomic counter when in fact it returned if the > addition

[lttng-dev] [PATCH lttng-modules v3] Fix: atomic_add_unless() returns true/false rather than prior value

2017-03-08 Thread Francis Deslauriers
The previous implementation assumed that `atomic_add_unless` returned the prior value of the atomic counter when in fact it returned if the addition was performed (true) or not performed (false). Since `atomic_add_unless` can not return INT_MAX, the `lttng_kref_get` always returned that the call wa

Re: [lttng-dev] [PATCH lttng-modules] Fix: atomic_add_unless() returns true/false rather than prior value

2017-03-08 Thread Mathieu Desnoyers
- On Mar 8, 2017, at 11:38 AM, Francis Deslauriers francis.deslauri...@efficios.com wrote: > The previous implementation assumed that `atomic_add_unless` returned the > prior value of the atomic counter when in fact it returned if addition was > successful(true) or overflowed(false). I think

[lttng-dev] [PATCH lttng-modules] Fix: atomic_add_unless() returns true/false rather than prior value

2017-03-08 Thread Francis Deslauriers
The previous implementation assumed that `atomic_add_unless` returned the prior value of the atomic counter when in fact it returned if addition was successful(true) or overflowed(false). Since `atomic_add_unless` can not return INT_MAX, the `lttng_kref_get` always returned that the call was succes

Re: [lttng-dev] [PATCH lttng-modules] Fix: atomic_add_unless() already returns zero on overflow

2017-03-08 Thread Mathieu Desnoyers
About the title: could you change it to "Fix: atomic_add_unless() returns true/false rather than prior value" ? And describe the discrepancy between the existing implementation vs kernel interface, and its effect ? Basically, even though the existing implementation aimed at preventing kref over