mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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: f9eb8aea2a
("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>
This commit is contained in:
parent
5362855aba
commit
52fbb29079
2 changed files with 7 additions and 3 deletions
|
@ -97,7 +97,11 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
|
|||
{
|
||||
if (qdisc_is_running(qdisc))
|
||||
return false;
|
||||
write_seqcount_begin(&qdisc->running);
|
||||
/* Variant of write_seqcount_begin() telling lockdep a trylock
|
||||
* was attempted.
|
||||
*/
|
||||
raw_write_seqcount_begin(&qdisc->running);
|
||||
seqcount_acquire(&qdisc->running.dep_map, 0, 1, _RET_IP_);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue