Commit:     4f9f8311a08c0d95c70261264a2b47f2ae99683a
Parent:     c62cf5cb173a5b8446e513a14448460cad435db2
Author:     Evgeniy Polyakov <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 6 03:08:09 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Nov 7 04:09:17 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/sched/sch_teql.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 421281d..c0ed06d 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 *
 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)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to