diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-08-18 07:02:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-18 07:02:11 +0200 |
commit | 3a76e3716b4e571f5d91a20b6afb412560599083 (patch) | |
tree | caf2e5e493774bef0bcf82eb489c00b68a0144bf /net/sched | |
parent | pkt_sched: Simplify dev_deactivate() polling loop. (diff) | |
download | linux-3a76e3716b4e571f5d91a20b6afb412560599083.tar.xz linux-3a76e3716b4e571f5d91a20b6afb412560599083.zip |
pkt_sched: Grab correct lock in notify_and_destroy().
From: Jarek Poplawski <jarkao2@gmail.com>
When we are destroying non-root qdiscs, we need to lock
the root of the qdisc tree not the the qdisc itself.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index c25465e5607a..c8dc72e12107 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -638,9 +638,9 @@ static void notify_and_destroy(struct sk_buff *skb, struct nlmsghdr *n, u32 clid qdisc_notify(skb, n, clid, old, new); if (old) { - spin_lock_bh(&old->q.lock); + sch_tree_lock(old); qdisc_destroy(old); - spin_unlock_bh(&old->q.lock); + sch_tree_unlock(old); } } |