mac80211: fix use before check of Qdisc length
authorRon Rindjunsky <ron.rindjunsky@intel.com>
Wed, 23 Apr 2008 10:45:12 +0000 (13:45 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 24 Apr 2008 01:25:35 +0000 (21:25 -0400)
This patch fixes use of Qdisc length in requeue function, before we checked
the reference is valid. (Adrian Bunk's catch)

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/wme.c

index 4e94e4026e78c3103630bfa9f5a673735339edfd..64faa3dc488f70d2cfb09fae1bb1c3470424153e 100644 (file)
@@ -709,7 +709,7 @@ void ieee80211_requeue(struct ieee80211_local *local, int queue)
        struct ieee80211_sched_data *q = qdisc_priv(root_qd);
        struct Qdisc *qdisc = q->queues[queue];
        struct sk_buff *skb = NULL;
-       u32 len = qdisc->q.qlen;
+       u32 len;
 
        if (!qdisc || !qdisc->dequeue)
                return;