Skip to content

Commit

Permalink
[PKT_SCHED]: Fix OOPS when removing devices from a teql queuing disci…
Browse files Browse the repository at this point in the history
…pline

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>
  • Loading branch information
Evgeniy Polyakov authored and David S. Miller committed Nov 7, 2007
1 parent c62cf5c commit 4f9f831
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/sched/sch_teql.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,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->header_ops == NULL ||
skb->dst == NULL ||
skb->dst->neighbour == NULL)
Expand Down

0 comments on commit 4f9f831

Please sign in to comment.