pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race
authorJarek Poplawski <jarkao2@gmail.com>
Thu, 21 Aug 2008 12:11:14 +0000 (05:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Aug 2008 12:11:14 +0000 (05:11 -0700)
commit2540e0511ea17e25831be543cdf9381e6209950d
tree31c505b9957d82125cd7e779d83da0d389f9d336
parent5e739d1752aca4e8f3e794d431503bfca3162df4
pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race

dev_deactivate() can skip rescheduling of a qdisc by qdisc_watchdog()
or other timer calling netif_schedule() after dev_queue_deactivate().
We prevent this checking aliveness before scheduling the timer. Since
during deactivation the root qdisc is available only as qdisc_sleeping
additional accessor qdisc_root_sleeping() is created.

With feedback from Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/sch_api.c
net/sched/sch_cbq.c