From: Andrew Cooper Date: Thu, 21 May 2020 08:19:33 +0000 (+0100) Subject: xen/trace: Don't dump offline CPUs in debugtrace_dump_worker() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~210 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=abf378e6483195b98a3f32e2c9d017e0eeeb275f;p=xen.git xen/trace: Don't dump offline CPUs in debugtrace_dump_worker() The 'T' debugkey reliably wedges on one of my systems, which has a sparse APIC_ID layout due to a non power-of-2 number of cores per socket. The per_cpu(dt_cpu_data, cpu) calcution falls over the deliberately non-canonical poison value. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/common/debugtrace.c b/xen/common/debugtrace.c index c21ec99ee0..f3794b9453 100644 --- a/xen/common/debugtrace.c +++ b/xen/common/debugtrace.c @@ -95,7 +95,7 @@ static void debugtrace_dump_worker(void) debugtrace_dump_buffer(dt_data, "global"); - for ( cpu = 0; cpu < nr_cpu_ids; cpu++ ) + for_each_online_cpu ( cpu ) { char buf[16];