]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
pkt_sched: Fix qdisc list locking
authorJarek Poplawski <jarkao2@gmail.com>
Fri, 22 Aug 2008 10:24:05 +0000 (03:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Aug 2008 10:31:39 +0000 (03:31 -0700)
commitf6e0b239a2657ea8cb67f0d83d0bfdbfd19a481b
tree9d6e3c97a81869fde3958cdbcf431ee3739f9b2c
parent2540e0511ea17e25831be543cdf9381e6209950d
pkt_sched: Fix qdisc list locking

Since some qdiscs call qdisc_tree_decrease_qlen() (so qdisc_lookup())
without rtnl_lock(), adding and deleting from a qdisc list needs
additional locking. This patch adds global spinlock qdisc_list_lock
and wrapper functions for modifying the list. It is considered as a
temporary solution until hfsc_dequeue(), netem_dequeue() and
tbf_dequeue() (or qdisc_tree_decrease_qlen()) are redone.

With feedback from Herbert Xu and David S. Miller.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_sched.h
net/sched/sch_api.c
net/sched/sch_generic.c