From: Ron Rindjunsky Date: Wed, 23 Apr 2008 10:45:12 +0000 (+0300) Subject: mac80211: fix use before check of Qdisc length X-Git-Tag: v2.6.26-rc1~1088^2~4^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0da926f05748d273e7b2b673b0de21629ae9acdd;p=linux-2.6 mac80211: fix use before check of Qdisc length 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 Signed-off-by: Adrian Bunk Signed-off-by: John W. Linville --- diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 4e94e4026e..64faa3dc48 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c @@ -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;