* net-next: unitialized lock
@ 2008-07-19 3:19 Stephen Hemminger
2008-07-19 6:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2008-07-19 3:19 UTC (permalink / raw)
To: netdev
Looks like locks on qdisc aren't initialized properly after
Dave's conversion to MQ.
# brctl addbr br0
# ifconfig br0 10.1.1.1
# ifconfig br0 down
------------------
[ 146.937241] br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
[ 253.874538] BUG: spinlock bad magic on CPU#2, ifconfig/7861
[ 253.874548] lock: ffffffff806c0558, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[ 253.874552] Pid: 7861, comm: ifconfig Not tainted 2.6.26 #12
[ 253.874557]
[ 253.874557] Call Trace:
[ 253.874566] [<ffffffff803884cf>] spin_bug+0xef/0x100
[ 253.874571] [<ffffffff803886ff>] _raw_spin_lock+0x9f/0x190
[ 253.874579] [<ffffffff8050a822>] _spin_lock_bh+0x32/0x40
[ 253.874584] [<ffffffff8048f197>] dev_deactivate_queue+0x37/0x70
[ 253.874591] [<ffffffff8048ee10>] dev_deactivate+0x40/0x150
[ 253.874596] [<ffffffff8047c18a>] dev_close+0x4a/0xa0
[ 253.874602] [<ffffffff8047bdb1>] dev_change_flags+0xa1/0x1d0
[ 253.874609] [<ffffffff804cba73>] devinet_ioctl+0x5b3/0x760
[ 253.874619] [<ffffffff804cc5fd>] inet_ioctl+0x6d/0x90
[ 253.874624] [<ffffffff8046f446>] sock_ioctl+0x56/0x240
[ 253.874630] [<ffffffff802cbc91>] vfs_ioctl+0x31/0x90
[ 253.874635] [<ffffffff802cbf5b>] do_vfs_ioctl+0x26b/0x2d0
[ 253.874640] [<ffffffff8050a391>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 253.874646] [<ffffffff802cc042>] sys_ioctl+0x82/0xa0
[ 253.874653] [<ffffffff8020c518>] system_call_after_swapgs+0x88/0x8d
[ 253.874660]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: net-next: unitialized lock
2008-07-19 3:19 net-next: unitialized lock Stephen Hemminger
@ 2008-07-19 6:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-07-19 6:01 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 18 Jul 2008 20:19:45 -0700
> Looks like locks on qdisc aren't initialized properly after
> Dave's conversion to MQ.
>
> # brctl addbr br0
> # ifconfig br0 10.1.1.1
> # ifconfig br0 down
The noqueue_qdisc is missing some initialization, the following
should fix it.
pkt_sched: Fix noqueue_qdisc initialization.
Like noop_qdisc, it needs a dummy backpointer and
explicit qdisc->q.lock initialization.
Based upon a report by Stephen Hemminger.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 14cc443..522a41a 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -340,12 +340,19 @@ static struct Qdisc_ops noqueue_qdisc_ops __read_mostly = {
.owner = THIS_MODULE,
};
+static struct Qdisc noqueue_qdisc;
+static struct netdev_queue noqueue_netdev_queue = {
+ .qdisc = &noqueue_qdisc,
+};
+
static struct Qdisc noqueue_qdisc = {
.enqueue = NULL,
.dequeue = noop_dequeue,
.flags = TCQ_F_BUILTIN,
.ops = &noqueue_qdisc_ops,
.list = LIST_HEAD_INIT(noqueue_qdisc.list),
+ .q.lock = __SPIN_LOCK_UNLOCKED(noqueue_qdisc.q.lock),
+ .dev_queue = &noqueue_netdev_queue,
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-19 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-19 3:19 net-next: unitialized lock Stephen Hemminger
2008-07-19 6:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).