* [PATCH 2/2] pkt_sched: Fix sch_tree_lock()
@ 2008-08-25 23:19 Jarek Poplawski
2008-08-27 9:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jarek Poplawski @ 2008-08-25 23:19 UTC (permalink / raw)
To: David Miller; +Cc: netdev
(apply after: [PATCH 1/2] pkt_sched: Fix gen_estimator locks)
-------------->
pkt_sched: Fix sch_tree_lock()
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>
---
include/net/sch_generic.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index ef8a7e2..e556962 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] pkt_sched: Fix sch_tree_lock()
2008-08-25 23:19 [PATCH 2/2] pkt_sched: Fix sch_tree_lock() Jarek Poplawski
@ 2008-08-27 9:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-08-27 9:27 UTC (permalink / raw)
To: jarkao2; +Cc: netdev
From: Jarek Poplawski <jarkao2@gmail.com>
Date: Tue, 26 Aug 2008 01:19:28 +0200
> (apply after: [PATCH 1/2] pkt_sched: Fix gen_estimator locks)
>
> -------------->
>
> pkt_sched: Fix sch_tree_lock()
>
> 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>
Excellent catch, applied, thanks Jarek!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-27 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 23:19 [PATCH 2/2] pkt_sched: Fix sch_tree_lock() Jarek Poplawski
2008-08-27 9:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).