Re: Regression in linux-next
From: Thomas Gleixner
Date: Mon Oct 16 2017 - 08:35:57 EST
On Mon, 16 Oct 2017, Petri Latvala wrote:
> > That should dump the trace buffer when the bug hits. I try to reproduce
> > myself.
>
> With those:
>
> # rtcwake -s 15 -m mem
>
> [ 67.069522] kernel BUG at arch/x86/kernel/apic/vector.c:154!
> [ 67.075509] invalid opcode: 0000 [#1] PREEMPT SMP
> [ 67.080481] Dumping ftrace buffer:
Hrm. I completely forgot that this does not dump the buffers of offline
CPUs. So half of the information is missing. So forget the tracer for now.
Can you please apply the debug patch below and provide the full dmesg
output?
Its going to be too big for LKML so either upload it somewhere or send it
to me in private mail.
Note, I removed the BUG_ON, so box might survive suspend/resume but it
should trigger that printout.
Thanks,
tglx
8<------------------------
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -140,6 +140,10 @@ static void apic_update_vector(struct ir
trace_vector_update(irqd->irq, newvec, newcpu, apicd->vector,
apicd->cpu);
+ pr_err("VU: CPU %u irq %u newvec %u newcpu %u curvec %u curcpu %u desc %p\n",
+ smp_processor_id(),irqd->irq, newvec, newcpu, apicd->vector,
+ apicd->cpu, desc);
+
/* Setup the vector move, if required */
if (apicd->vector && cpu_online(apicd->cpu)) {
apicd->move_in_progress = true;
@@ -151,7 +155,9 @@ static void apic_update_vector(struct ir
apicd->vector = newvec;
apicd->cpu = newcpu;
- BUG_ON(!IS_ERR_OR_NULL(per_cpu(vector_irq, newcpu)[newvec]));
+ if (!IS_ERR_OR_NULL(per_cpu(vector_irq, newcpu)[newvec]))
+ pr_err("VU not empty %p\n", per_cpu(vector_irq, newcpu)[newvec]);
+
per_cpu(vector_irq, newcpu)[newvec] = desc;
}