netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/3] net: device tracking improvements
@ 2022-02-04 22:42 Eric Dumazet
  2022-02-04 22:42 ` [PATCH v2 net-next 1/3] ref_tracker: implement use-after-free detection Eric Dumazet
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Dumazet @ 2022-02-04 22:42 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski; +Cc: netdev, Eric Dumazet, Eric Dumazet

From: Eric Dumazet <edumazet@google.com>

Main goal of this series is to be able to detect the following case
which apparently is still haunting us.

dev_hold_track(dev, tracker_1, GFP_ATOMIC);
    dev_hold(dev);
    dev_put(dev);
    dev_put(dev);              // Should complain loudly here.
dev_put_track(dev, tracker_1); // instead of here (as before this series)


v2: third patch:
  I replaced the dev_put() in linkwatch_do_dev() with __dev_put().

Eric Dumazet (3):
  ref_tracker: implement use-after-free detection
  ref_tracker: add a count of untracked references
  net: refine dev_put()/dev_hold() debugging

 include/linux/netdevice.h   | 69 ++++++++++++++++++++++++-------------
 include/linux/ref_tracker.h |  4 +++
 lib/ref_tracker.c           | 17 ++++++++-
 net/core/dev.c              |  2 +-
 net/core/link_watch.c       |  6 ++--
 5 files changed, 70 insertions(+), 28 deletions(-)

-- 
2.35.0.263.gb82422642f-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-05 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-04 22:42 [PATCH v2 net-next 0/3] net: device tracking improvements Eric Dumazet
2022-02-04 22:42 ` [PATCH v2 net-next 1/3] ref_tracker: implement use-after-free detection Eric Dumazet
2022-02-04 22:42 ` [PATCH v2 net-next 2/3] ref_tracker: add a count of untracked references Eric Dumazet
2022-02-04 22:42 ` [PATCH v2 net-next 3/3] net: refine dev_put()/dev_hold() debugging Eric Dumazet
2022-02-05 15:40 ` [PATCH v2 net-next 0/3] net: device tracking improvements patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).