From: Thomas Gleixner <tglx@linutronix.de>
To: Tariq Toukan <tariqt@mellanox.com>
Cc: linux-kernel@vger.kernel.org, Maor Gottlieb <maorg@mellanox.com>
Subject: Re: WARNING and PANIC in irq_matrix_free
Date: Thu, 22 Feb 2018 22:38:49 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.1802222227440.1612@nanos.tec.linutronix.de> (raw)
In-Reply-To: <1e79eaa9-202d-b48c-4463-ae195a4fc891@mellanox.com>
On Wed, 21 Feb 2018, Tariq Toukan wrote:
> On 20/02/2018 8:18 PM, Thomas Gleixner wrote:
> > On Tue, 20 Feb 2018, Thomas Gleixner wrote:
> > > On Tue, 20 Feb 2018, Tariq Toukan wrote:
> > >
> > > Is there CPU hotplugging in play?
>
> No.
Ok.
> > >
> > > I'll come back to you tomorrow with a plan how to debug that after staring
> > > into the code some more.
> >
> > Do you have a rough idea what the test case is doing?
> >
>
> It arbitrary appears in different flows, like sending traffic or interface
> configuration changes.
Hmm. Looks like memory corruption, but I can't pin point it.
Find below a debug patch which should prevent the crash and might give us
some insight into the type of corruption.
Please enable the irq_matrix and vector allocation trace points.
echo 1 >/sys/kernel/debug/tracing/events/irq_matrix/enable
echo 1 >/sys/kernel/debug/tracing/events/irq_vectors/vector*/enable
When the problem triggers the bogus vector is printed and the trace is
frozen. Please provide dmesg and the tracebuffer output.
Thanks,
tglx
8<--------------
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -822,6 +822,12 @@ static void free_moved_vector(struct api
unsigned int cpu = apicd->prev_cpu;
bool managed = apicd->is_managed;
+ if (vector < FIRST_EXTERNAL_VECTOR || vector >= FIRST_SYSTEM_VECTOR) {
+ tracing_off();
+ pr_err("Trying to clear prev_vector: %u\n", vector);
+ goto out;
+ }
+
/*
* This should never happen. Managed interrupts are not
* migrated except on CPU down, which does not involve the
@@ -833,6 +839,7 @@ static void free_moved_vector(struct api
trace_vector_free_moved(apicd->irq, cpu, vector, managed);
irq_matrix_free(vector_matrix, cpu, vector, managed);
per_cpu(vector_irq, cpu)[vector] = VECTOR_UNUSED;
+out:
hlist_del_init(&apicd->clist);
apicd->prev_vector = 0;
apicd->move_in_progress = 0;
next prev parent reply other threads:[~2018-02-22 21:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 12:07 Tariq Toukan
2018-02-20 18:11 ` Thomas Gleixner
2018-02-20 18:18 ` Thomas Gleixner
2018-02-21 11:27 ` Tariq Toukan
2018-02-22 21:38 ` Thomas Gleixner [this message]
2018-02-25 9:50 ` Tariq Toukan
2018-05-18 22:41 ` Dmitry Safonov
2018-05-18 23:43 ` Dmitry Safonov
2018-05-19 11:20 ` Thomas Gleixner
2018-05-23 7:16 ` Tariq Toukan
2018-05-23 8:49 ` Thomas Gleixner
2018-05-25 20:10 ` Song Liu
2018-05-25 21:29 ` Song Liu
2018-05-28 10:53 ` Thomas Gleixner
2018-05-28 11:17 ` Tariq Toukan
2018-05-28 14:27 ` Thomas Gleixner
2018-05-28 18:36 ` Song Liu
2018-05-28 18:34 ` Song Liu
2018-05-28 20:09 ` Thomas Gleixner
[not found] ` <3F47F523-64C5-422B-B9B0-73B8D105CF71@fb.com>
2018-05-29 8:35 ` Thomas Gleixner
2018-05-29 16:54 ` Song Liu
2018-05-30 21:56 ` Thomas Gleixner
2018-06-04 7:56 ` Dou Liyang
2018-06-04 11:17 ` Thomas Gleixner
2018-06-04 11:59 ` Dou Liyang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1802222227440.1612@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=tariqt@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®