Merge branch 'net-add-preliminary-netdev-refcount-tracking'
Eric Dumazet says: ==================== net: add preliminary netdev refcount tracking Two first patches add a generic infrastructure, that will be used to get tracking of refcount increments/decrements. The general idea is to be able to precisely pair each decrement with a corresponding prior increment. Both share a cookie, basically a pointer to private data storing stack traces. The third patch adds dev_hold_track() and dev_put_track() helpers (CONFIG_NET_DEV_REFCNT_TRACKER) Then a series of 20 patches converts some dev_hold()/dev_put() pairs to new hepers : dev_hold_track() and dev_put_track(). Hopefully this will be used by developpers and syzbot to root cause bugs that cause netdevice dismantles freezes. With CONFIG_PCPU_DEV_REFCNT=n option, we were able to detect some class of bugs, but too late (when too many dev_put() were happening). Another series will be sent after this one is merged. v3: moved NET_DEV_REFCNT_TRACKER to net/Kconfig.debug added "depends on DEBUG_KERNEL && STACKTRACE_SUPPORT" to hopefully get rid of kbuild reports for ARCH=nios2 Reworded patch 3 changelog. Added missing htmldocs (Jakub) v2: added four additional patches, added netdev_tracker_alloc() and netdev_tracker_free() addressed build error (kernel bots), use GFP_ATOMIC in test_ref_tracker_timer_func() ==================== Link: https://lore.kernel.org/r/20211205042217.982127-1-eric.dumazet@gmail.com Signed-off-by:Jakub Kicinski <kuba@kernel.org>
Showing
- drivers/net/netconsole.c 1 addition, 1 deletiondrivers/net/netconsole.c
- include/linux/inetdevice.h 2 additions, 0 deletionsinclude/linux/inetdevice.h
- include/linux/mroute_base.h 2 additions, 0 deletionsinclude/linux/mroute_base.h
- include/linux/netdevice.h 68 additions, 0 deletionsinclude/linux/netdevice.h
- include/linux/netpoll.h 1 addition, 0 deletionsinclude/linux/netpoll.h
- include/linux/ref_tracker.h 73 additions, 0 deletionsinclude/linux/ref_tracker.h
- include/net/devlink.h 4 additions, 0 deletionsinclude/net/devlink.h
- include/net/dst.h 1 addition, 0 deletionsinclude/net/dst.h
- include/net/failover.h 1 addition, 0 deletionsinclude/net/failover.h
- include/net/if_inet6.h 1 addition, 0 deletionsinclude/net/if_inet6.h
- include/net/ip6_tunnel.h 1 addition, 0 deletionsinclude/net/ip6_tunnel.h
- include/net/ip_tunnels.h 3 additions, 0 deletionsinclude/net/ip_tunnels.h
- include/net/neighbour.h 3 additions, 0 deletionsinclude/net/neighbour.h
- include/net/sch_generic.h 1 addition, 1 deletioninclude/net/sch_generic.h
- lib/Kconfig 5 additions, 0 deletionslib/Kconfig
- lib/Kconfig.debug 15 additions, 0 deletionslib/Kconfig.debug
- lib/Makefile 3 additions, 1 deletionlib/Makefile
- lib/ref_tracker.c 140 additions, 0 deletionslib/ref_tracker.c
- lib/test_ref_tracker.c 115 additions, 0 deletionslib/test_ref_tracker.c
- net/Kconfig.debug 10 additions, 0 deletionsnet/Kconfig.debug
Please register or sign in to comment