From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
<stable-rt@vger.kernel.org>
Subject: [PATCH RT 07/10] net/core/cpuhotplug: Drain input_pkt_queue lockless
Date: Fri, 26 Feb 2016 16:35:58 -0500 [thread overview]
Message-ID: <20160226213709.366991188@goodmis.org> (raw)
In-Reply-To: 20160226213551.557375746@goodmis.org
[-- Attachment #1: 0007-net-core-cpuhotplug-Drain-input_pkt_queue-lockless.patch --]
[-- Type: text/plain, Size: 2489 bytes --]
3.14.61-rt63-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Grygorii Strashko <grygorii.strashko@ti.com>
I can constantly see below error report with 4.1 RT-kernel on TI ARM dra7-evm
if I'm trying to unplug cpu1:
[ 57.737589] CPU1: shutdown
[ 57.767537] BUG: spinlock bad magic on CPU#0, sh/137
[ 57.767546] lock: 0xee994730, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[ 57.767552] CPU: 0 PID: 137 Comm: sh Not tainted 4.1.10-rt8-01700-g2c38702-dirty #55
[ 57.767555] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 57.767568] [<c001acd0>] (unwind_backtrace) from [<c001534c>] (show_stack+0x20/0x24)
[ 57.767579] [<c001534c>] (show_stack) from [<c075560c>] (dump_stack+0x84/0xa0)
[ 57.767593] [<c075560c>] (dump_stack) from [<c00aca48>] (spin_dump+0x84/0xac)
[ 57.767603] [<c00aca48>] (spin_dump) from [<c00acaa4>] (spin_bug+0x34/0x38)
[ 57.767614] [<c00acaa4>] (spin_bug) from [<c00acc10>] (do_raw_spin_lock+0x168/0x1c0)
[ 57.767624] [<c00acc10>] (do_raw_spin_lock) from [<c075b4cc>] (_raw_spin_lock+0x4c/0x54)
[ 57.767631] [<c075b4cc>] (_raw_spin_lock) from [<c07599fc>] (rt_spin_lock_slowlock+0x5c/0x374)
[ 57.767638] [<c07599fc>] (rt_spin_lock_slowlock) from [<c075bcf4>] (rt_spin_lock+0x38/0x70)
[ 57.767649] [<c075bcf4>] (rt_spin_lock) from [<c06333c0>] (skb_dequeue+0x28/0x7c)
[ 57.767662] [<c06333c0>] (skb_dequeue) from [<c06476ec>] (dev_cpu_callback+0x1b8/0x240)
[ 57.767673] [<c06476ec>] (dev_cpu_callback) from [<c007566c>] (notifier_call_chain+0x3c/0xb4)
The reason is that skb_dequeue is taking skb->lock, but RT changed the
core code to use a raw spinlock. The non-raw lock is not initialized
on purpose to catch exactly this kind of problem.
Fixes: 91df05da13a6 'net: Use skbufhead with raw lock'
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable-rt@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index ddb8578b2f34..055dc9c98b10 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6890,7 +6890,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
netif_rx_internal(skb);
input_queue_head_incr(oldsd);
}
- while ((skb = skb_dequeue(&oldsd->input_pkt_queue))) {
+ while ((skb = __skb_dequeue(&oldsd->input_pkt_queue))) {
netif_rx_internal(skb);
input_queue_head_incr(oldsd);
}
--
2.7.0
next prev parent reply other threads:[~2016-02-26 21:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 21:35 [PATCH RT 00/10] Linux 3.14.61-rt63-rc1 Steven Rostedt
2016-02-26 21:35 ` [PATCH RT 01/10] cpufreq: Remove cpufreq_rwsem Steven Rostedt
2016-02-26 21:35 ` [PATCH RT 02/10] ARM: smp: Move clear_tasks_mm_cpumask() call to __cpu_die() Steven Rostedt
2016-02-26 21:35 ` Steven Rostedt
2016-02-26 21:35 ` Steven Rostedt
2016-02-26 21:35 ` [PATCH RT 03/10] rtmutex: Handle non enqueued waiters gracefully Steven Rostedt
2016-02-26 21:35 ` [PATCH RT 04/10] rtmutex: Use chainwalking control enum Steven Rostedt
2016-02-26 21:35 ` [PATCH RT 05/10] dump stack: dont disable preemption during trace Steven Rostedt
2016-02-26 21:35 ` [PATCH RT 06/10] net: Make synchronize_rcu_expedited() conditional on !RT_FULL Steven Rostedt
2016-02-26 21:35 ` Steven Rostedt [this message]
2016-02-26 21:35 ` [PATCH RT 08/10] irqwork: Move irq safe work to irq context Steven Rostedt
2016-02-26 21:36 ` [PATCH RT 09/10] sched: Introduce the trace_sched_waking tracepoint Steven Rostedt
2016-02-26 21:36 ` [PATCH RT 10/10] Linux 3.14.61-rt63-rc1 Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2016-02-26 21:39 [PATCH RT 00/10] Linux 3.12.54-rt73-rc1 Steven Rostedt
2016-02-26 21:39 ` [PATCH RT 07/10] net/core/cpuhotplug: Drain input_pkt_queue lockless Steven Rostedt
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=20160226213709.366991188@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.