summaryrefslogtreecommitdiff
path: root/scripts/stackdelta
diff options
context:
space:
mode:
authorMohsin Bashir <hmohsin@meta.com>2026-05-07 02:37:45 +0300
committerJakub Kicinski <kuba@kernel.org>2026-05-09 01:45:47 +0300
commita77d5a069d959dc45f5f472d48cba37d8cba0f1c (patch)
treefc8e6fbe8842940373e9da5b305f50c045a3d796 /scripts/stackdelta
parentefda25ee84325385f859d10872590e90ce837243 (diff)
downloadlinux-a77d5a069d959dc45f5f472d48cba37d8cba0f1c.tar.xz
net: shaper: Reject reparenting of existing nodes
When an existing node-scope shaper is moved to a different parent via the group operation, the framework fails to update the leaves count on both the old and new parent shapers. Only newly created nodes (handle.id == NET_SHAPER_ID_UNSPEC) trigger the parent leaves increment at line 1039. This causes the parent's leaves counter to diverge from the actual number of children in the xarray. When the node is later deleted, pre_del_node() allocates an array sized by the stale leaves count, but the xarray iteration finds more children than expected, hitting the WARN_ON_ONCE guard and returning -EINVAL. Rather than adding reparenting support with complex leaves count bookkeeping, reject group calls that attempt to change an existing node's parent. Updates to an existing node's rate or leaves under the same parent remain permitted. We expect that for any modification of the topology user should always create new groups and let the kernel garbage collect the leaf-less nodes. Fixes: 5d5d4700e75d ("net-shapers: implement NL group operation") Signed-off-by: Mohsin Bashir <hmohsin@meta.com> Link: https://patch.msgid.link/20260506233745.111895-1-mohsin.bashr@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/stackdelta')
0 files changed, 0 insertions, 0 deletions