diff options
author | Eric Dumazet <edumazet@google.com> | 2018-01-27 21:58:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-29 22:29:10 +0300 |
commit | 40ca54e3a686f13117f3de0c443f8026dadf7c44 (patch) | |
tree | 4a862aeb41537911eea7381b64ab8275bc9695f6 /kernel/padata.c | |
parent | 032dc41ba6e2744a8105e1743607fc4ee155278d (diff) | |
download | linux-40ca54e3a686f13117f3de0c443f8026dadf7c44.tar.xz |
net_sched: gen_estimator: fix lockdep splat
syzbot reported a lockdep splat in gen_new_estimator() /
est_fetch_counters() when attempting to lock est->stats_lock.
Since est_fetch_counters() is called from BH context from timer
interrupt, we need to block BH as well when calling it from process
context.
Most qdiscs use per cpu counters and are immune to the problem,
but net/sched/act_api.c and net/netfilter/xt_RATEEST.c are using
a spinlock to protect their data. They both call gen_new_estimator()
while object is created and not yet alive, so this bug could
not trigger a deadlock, only a lockdep splat.
Fixes: 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/padata.c')
0 files changed, 0 insertions, 0 deletions