Fix various minor bugs in the net shaper API. First 4 changes are a bit hairy. The readers are currently under RCU so we need to be careful how we update and insert the nodes. Patch 4 is a bit of a cop-out. Pre-allocating replacement nodes is complex. If the workaround is not acceptable I'd seriously consider making the readers take the instance lock.
Only other patch of note is patch 10. We want to add a Netlink policy check on the handle ID. This necessitates patch 9. The rest are simple and self-explanatory. Jakub Kicinski (12): net: shaper: drop redundant xa_lock() bracketing net: shaper: flip the polarity of the valid flag net: shaper: fix trivial ordering issue in net_shaper_commit() net: shaper: try to avoid violating RCU net: shaper: reject duplicate leaves in GROUP request selftests: drv-net: add shaper test for duplicate leaves net: shaper: set ret to -ENOMEM when genlmsg_new() fails in group_doit net: shaper: fix undersized reply skb allocation in GROUP command tools: ynl: add scope qualifier for definitions net: shaper: reject handle IDs exceeding internal bit-width net: shaper: enforce singleton NETDEV scope with id 0 net: shaper: reject QUEUE scope handle with missing id Documentation/netlink/genetlink-c.yaml | 9 + Documentation/netlink/genetlink-legacy.yaml | 9 + Documentation/netlink/genetlink.yaml | 9 + Documentation/netlink/specs/net_shaper.yaml | 7 + net/shaper/shaper_nl_gen.h | 2 + net/shaper/shaper.c | 171 +++++++++++++----- net/shaper/shaper_nl_gen.c | 7 +- tools/net/ynl/pyynl/ynl_gen_c.py | 31 +++- tools/testing/selftests/drivers/net/shaper.py | 25 ++- 9 files changed, 216 insertions(+), 54 deletions(-) -- 2.54.0
