Skip to content

net: device tracking improvements

Eric Dumazet netdev 2 versions Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesApplied 3/3
  2. v13 patches 2 repliesSuperseded

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3ref_tracker: implement use-after-free detectioninclude/linux/ref_tracker.h lib/ref_tracker.c+7 -00 repliesApplied
2/3ref_tracker: add a count of untracked referencesinclude/linux/ref_tracker.h lib/ref_tracker.c+13 -10 repliesApplied
3/3net: refine dev_put()/dev_hold() debugginginclude/linux/netdevice.h net/core/dev.c net/core/link_watch.c+50 -270 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 net-next 0/3] net: device tracking improvements

From: Eric Dumazet <[email protected]>

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(-)
Signature · 1 line
2.35.0.263.gb82422642f-goog