Skip to content

Commit

Permalink
pkt_sched: Fix sch_tree_lock()
Browse files Browse the repository at this point in the history
Use new qdisc_root_sleeping_lock() instead of qdisc_root_lock() as
sch_tree_lock() because this lock could be used while dev is
deactivated, but we never need to use this with noop_qdisc as a root.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Aug 27, 2008
1 parent f6f9b93 commit fe439dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc)

static inline void sch_tree_lock(struct Qdisc *q)
{
spin_lock_bh(qdisc_root_lock(q));
spin_lock_bh(qdisc_root_sleeping_lock(q));
}

static inline void sch_tree_unlock(struct Qdisc *q)
{
spin_unlock_bh(qdisc_root_lock(q));
spin_unlock_bh(qdisc_root_sleeping_lock(q));
}

#define tcf_tree_lock(tp) sch_tree_lock((tp)->q)
Expand Down

0 comments on commit fe439dd

Please sign in to comment.