aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_teql.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2007-11-06 06:08:09 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-11-07 07:09:17 -0500
commit4f9f8311a08c0d95c70261264a2b47f2ae99683a (patch)
tree4bb68c56e60535f40415077462223fd64f920f31 /net/sched/sch_teql.c
parentc62cf5cb173a5b8446e513a14448460cad435db2 (diff)
[PKT_SCHED]: Fix OOPS when removing devices from a teql queuing discipline
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>
Diffstat (limited to 'net/sched/sch_teql.c')
-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 421281d9dd1d..c0ed06d4a504 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -252,6 +252,9 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
252static inline int teql_resolve(struct sk_buff *skb, 252static inline int teql_resolve(struct sk_buff *skb,
253 struct sk_buff *skb_res, struct net_device *dev) 253 struct sk_buff *skb_res, struct net_device *dev)
254{ 254{
255 if (dev->qdisc == &noop_qdisc)
256 return -ENODEV;
257
255 if (dev->header_ops == NULL || 258 if (dev->header_ops == NULL ||
256 skb->dst == NULL || 259 skb->dst == NULL ||
257 skb->dst->neighbour == NULL) 260 skb->dst->neighbour == NULL)