summaryrefslogtreecommitdiff
path: root/net/sched/sch_generic.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-06-09 07:45:11 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-09 13:28:37 -0700
commit52fbb2907988aa0583c6d9d53a56aee090b2df7e (patch)
treed15d8d64e2160d72224285158cac6e1e8b343b04 /net/sched/sch_generic.c
parent5362855aba7159aab8f7c6573eb675d9da317914 (diff)
net: sched: fix qdisc->running lockdep annotations
1) qdisc_run_begin() is really using the equivalent of a trylock. Instead of using write_seqcount_begin(), use a combination of raw_write_seqcount_begin() and correct lockdep annotation. 2) sch_direct_xmit() should use regular spin_lock(root_lock) Fixes: f9eb8aea2a1e ("net_sched: transform qdisc running bit into a seqcount") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r--net/sched/sch_generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index cebea73e70ac..cad810b45e31 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -137,10 +137,10 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
HARD_TX_UNLOCK(dev, txq);
} else {
- spin_lock_nested(root_lock, SINGLE_DEPTH_NESTING);
+ spin_lock(root_lock);
return qdisc_qlen(q);
}
- spin_lock_nested(root_lock, SINGLE_DEPTH_NESTING);
+ spin_lock(root_lock);
if (dev_xmit_complete(ret)) {
/* Driver sent out skb successfully or skb was consumed */