On 08/30/2018 10:28 AM, Juergen Gross wrote:
> On 30/08/18 10:26, Jan Beulich wrote:
> On 30.08.18 at 09:52, wrote:
>>> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages)
>>> * Allocate buffers for all of the cpus.
>>> * If any fails, deallocate what you have so
>>> On 10.09.18 at 13:34, wrote:
> On 30/08/18 11:28, Juergen Gross wrote:
>> On 30/08/18 10:26, Jan Beulich wrote:
>> On 30.08.18 at 09:52, wrote:
@@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages)
* Allocate buffers for all of the cpus.
* If any
On 30/08/18 11:28, Juergen Gross wrote:
> On 30/08/18 10:26, Jan Beulich wrote:
> On 30.08.18 at 09:52, wrote:
>>> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages)
>>> * Allocate buffers for all of the cpus.
>>> * If any fails, deallocate what you have so far
On 30/08/18 10:26, Jan Beulich wrote:
On 30.08.18 at 09:52, wrote:
>> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages)
>> * Allocate buffers for all of the cpus.
>> * If any fails, deallocate what you have so far and exit.
>> */
>> -
>>> On 30.08.18 at 09:52, wrote:
> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages)
> * Allocate buffers for all of the cpus.
> * If any fails, deallocate what you have so far and exit.
> */
> -for_each_online_cpu(cpu)
> +for_each_present_cpu(cpu)
>
The per-cpu buffers for Xentrace are addressed by cpu-id, but the info
array for the buffers is sized only by number of online cpus. This
might lead to crashes when using Xentrace with smt=0.
The t_info structure has to be sized based on nr_cpu_ids.
Signed-off-by: Juergen Gross
---