summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2007-11-13 00:07:45 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2007-11-21 09:25:54 -0800
commit2d23541246308b5d2867c6592ad2b09e9a1ae344 (patch)
treec47c781c3c948fd120ba4eaaae402e0ba564aa64 /net
parent5263c68d8f067f8bc4f6dd8bfb4ceb547d60fe7c (diff)
downloadlwn-2d23541246308b5d2867c6592ad2b09e9a1ae344.tar.gz
lwn-2d23541246308b5d2867c6592ad2b09e9a1ae344.zip
Fix TEQL oops.
[PKT_SCHED]: Fix OOPS when removing devices from a teql queuing discipline [ Upstream commit: 4f9f8311a08c0d95c70261264a2b47f2ae99683a ] tecl_reset() is called from deactivate and qdisc is set to noop already, but subsequent teql_xmit does not know about it and dereference private data as teql qdisc and thus oopses. not catch it first :) Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_teql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index f05ad9a30b4c..656ccd919d3c 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -263,6 +263,9 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
static __inline__ int
teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev)
{
+ if (dev->qdisc == &noop_qdisc)
+ return -ENODEV;
+
if (dev->hard_header == NULL ||
skb->dst == NULL ||
skb->dst->neighbour == NULL)