Re: [PATCH v2] perf: fix ring_buffer perf_output_space() boundary calculation

2013-03-19 Thread Peter Zijlstra
On Mon, 2013-03-18 at 14:33 +0100, Stephane Eranian wrote: > This patch fixes a flaw in perf_output_space(). In case the size > of the space needed is bigger than the actual buffer size, there > may be situations where the function would return true (i.e., there > is space) when it should not. head

[PATCH v2] perf: fix ring_buffer perf_output_space() boundary calculation

2013-03-18 Thread Stephane Eranian
This patch fixes a flaw in perf_output_space(). In case the size of the space needed is bigger than the actual buffer size, there may be situations where the function would return true (i.e., there is space) when it should not. head > offset due to rounding of the masking logic. The problem can b