Skip to content

rhashtable: Notify on resize to allow signaling interrupted dumps

Thomas Graf netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 35 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rhashtable: Provide notifier for deferred resizesinclude/linux/rhashtable.h lib/rhashtable.c+19 -40 replies
2/3netlink: Mark dumps as inconsistent which have been interrupted by a resizenet/netlink/af_netlink.c net/netlink/af_netlink.h net/netlink/diag.c+12 -046 replies
3/3netlink: Lock out table resizes while dumping Netlink socketsnet/netlink/diag.c+3 -029 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchThomas GrafPatrick McHardy
1/3
2/3A-b A-b A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3 net-next] rhashtable: Notify on resize to allow signaling interrupted dumps

Netlink dumps have a traditional weakness of being interruptible and non-atomic. Once the message buffer has been filled, all protective locks must be released and the buffer is handed over to the user to copy the data. The dumping then continues from the previously stored offsets in the data structures. Due to dropping of the locks, mutations can occur.

This first series introduces a new notification mechanism which allows users of rhashtable to bump a sequence number on resizes and report an inconsistent dump to user space.

As discussed in the netdev thread ("[PATCH 7/9] rhashtable: Per bucket locks & deferred expansion/shrinking").

Thomas Graf (3):
rhashtable: Provide notifier for deferred resizes
netlink: Mark dumps as inconsistent which have been interrupted by a
resize
netlink: Lock out table resizes while dumping Netlink sockets

 include/linux/rhashtable.h | 10 +++++++++-
 lib/rhashtable.c           | 13 ++++++++++---
 net/netlink/af_netlink.c   | 10 ++++++++++
 net/netlink/af_netlink.h   |  1 +
 net/netlink/diag.c         |  4 ++++
 5 files changed, 34 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.3