2008-04-23 09:51:40

by Adrian Bunk

[permalink] [raw]
Subject: mac80211/wme.c: check-after-use

The Coverity checker spotted the following check-after-use of the
"qdisc" variable in net/mac80211/wme.c introduced by
commit 9e7234923789897858e1a475c579b5e2e6ad5b74
(mac80211: A-MPDU Tx adding qdisc support):

<-- snip -->

...
void ieee80211_requeue(struct ieee80211_local *local, int queue)
{
struct Qdisc *root_qd = local->mdev->qdisc_sleeping;
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; <------

if (!qdisc || !qdisc->dequeue)
return;
...

<-- snip -->

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed



2008-04-23 10:31:09

by Ron Rindjunsky

[permalink] [raw]
Subject: RE: mac80211/wme.c: check-after-use


> The Coverity checker spotted the following check-after-use of the
>
> u32 len = qdisc->q.qlen; <------
>
> if (!qdisc || !qdisc->dequeue)
> return;

Yep, this is a left over, I'll fix it
Thanks
Ron

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.