Re: [lttng-dev] [PATCH urcu] fix: handle EINTR correctly in get_cpu_mask_from_sysfs

2024-05-02 Thread Mathieu Desnoyers via lttng-dev
On 2024-05-01 19:42, Benjamin Marzinski via lttng-dev wrote: If the read() in get_cpu_mask_from_sysfs() fails with EINTR, the code is supposed to retry, but the while loop condition has (bytes_read > 0), which is false when read() fails with EINTR. The result is that the code exits the loop, havi

Re: [lttng-dev] [PATCH urcu] fix: handle EINTR correctly in get_cpu_mask_from_sysfs

2024-05-02 Thread Michael Jeanson via lttng-dev
On 2024-05-02 09:54, Mathieu Desnoyers wrote: On 2024-05-01 19:42, Benjamin Marzinski via lttng-dev wrote: If the read() in get_cpu_mask_from_sysfs() fails with EINTR, the code is supposed to retry, but the while loop condition has (bytes_read > 0), which is false when read() fails with EINTR. T

Re: [lttng-dev] [PATCH urcu] fix: handle EINTR correctly in get_cpu_mask_from_sysfs

2024-05-02 Thread Mathieu Desnoyers via lttng-dev
On 2024-05-02 10:32, Michael Jeanson wrote: On 2024-05-02 09:54, Mathieu Desnoyers wrote: On 2024-05-01 19:42, Benjamin Marzinski via lttng-dev wrote: If the read() in get_cpu_mask_from_sysfs() fails with EINTR, the code is supposed to retry, but the while loop condition has (bytes_read > 0), w