diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-05-10 22:28:57 +0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-05-12 17:14:59 +0300 |
| commit | a9a2fa1da619f276580b0d4c5d12efac89e8642b (patch) | |
| tree | 846614955192bad1fa256c499d7b35313486124f /tools/lib/python/kdoc | |
| parent | 235fb5376139c3419f2218349f1fa2f06f24f7ad (diff) | |
| download | linux-a9a2fa1da619f276580b0d4c5d12efac89e8642b.tar.xz | |
net: shaper: reject duplicate leaves in GROUP request
net_shaper_nl_group_doit() does not deduplicate NET_SHAPER_A_LEAVES
entries. When userspace supplies the same leaf handle twice, the same
old-parent pointer lands twice in old_nodes[]. The cleanup loop double
frees the parent. Of course the same parent may still be in old_nodes[]
twice if we are moving multiple of its leaves.
Note that this patch also implicitly fixes the fact that the
i >= leaves_count path forgets to set ret.
Fixes: 5d5d4700e75d ("net-shapers: implement NL group operation")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260510192904.3987113-4-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
