summaryrefslogtreecommitdiff
path: root/tools/perf/python
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-03-29 12:25:22 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-22 10:59:50 +0200
commit01cc9ab6fdf1ddb0a5355196557b95819788f9bb (patch)
tree873a6114bea78aa3824575710ca1ff81553583f2 /tools/perf/python
parent2dc72d6a7f0e8b2eff9f17959157cf50618bc1ca (diff)
sit: proper dev_{hold|put} in ndo_[un]init methods
commit 6289a98f0817a4a457750d6345e754838eae9439 upstream. After adopting CONFIG_PCPU_DEV_REFCNT=n option, syzbot was able to trigger a warning [1] Issue here is that: - all dev_put() should be paired with a corresponding prior dev_hold(). - A driver doing a dev_put() in its ndo_uninit() MUST also do a dev_hold() in its ndo_init(), only when ndo_init() is returning 0. Otherwise, register_netdevice() would call ndo_uninit() in its error path and release a refcount too soon. Fixes: 919067cc845f ("net: add CONFIG_PCPU_DEV_REFCNT") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/python')
0 files changed, 0 insertions, 0 deletions