summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2026-09-10 11:27:53 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-09-10 11:27:54 +0200
commit4770e9f851b782c0047d617a62897f957e441eca (patch)
treec433561f4864a5ad1f4c16b690ad20a14a93070f /scripts/basic/split-include.c
parent00f9fbc12320253bfc576fb7539d860029c82d0f (diff)
parente190a7aabbea4fbfec0e74de134144cb4d040738 (diff)
downloadlinux-4770e9f851b782c0047d617a62897f957e441eca.tar.gz
linux-4770e9f851b782c0047d617a62897f957e441eca.zip
Merge branch 'net-sched-cls_route-fix-bucket-retention-and-handle-recomputation'
Victor Nogueira says: ==================== net/sched: cls_route: fix bucket retention and handle recomputation Patch 1 is the v1 patch, unchanged. route4_change() can move an existing filter to a different top-level bucket, since route4_set_parms() recomputes the handle from TCA_ROUTE4_TO/FROM/IIF. The filter is unlinked from the old bucket, but the bucket itself is never freed once it goes empty, so route4_delete() keeps reporting *last=false after the last live filter is gone. That pins the empty tcf_proto and leaks it. The filters linked to a bucket are refcounted now, and the bucket is dropped from head->table[] as soon as the count reaches zero. Reviewing v1, Sashiko pointed out that the duplicate scan in route4_set_parms() compares against the wrong handle [1]. Patches 2 and 3 fix the two symptoms of that. Patch 2 makes the scan compare against nhandle. f->handle is the handle the filter has before the update, not the one it is about to be linked under, so a change that moves a filter into a chain already holding nhandle misses the collision and links a second filter under the same handle. The newcomer is then unreachable: route4_get() returns the incumbent, and route4_classify() stops at the first filter whose f->id matches. Patch 3 handles the mirror case. An in-place replace computes an nhandle that the filter being replaced already carries, so the scan finds that filter and rejects the request with -EEXIST. The older filter is passed to route4_set_parms() and skipped in the scan. Skipping it alone would rename the filter it replaces: the 0x7F00 order bits are carried in no attribute and were folded into nhandle on the create path alone, so an order 1 filter came back as order 0, and a sibling sharing its key could then no longer be replaced at all. They are carried over now whenever the request builds the key the filter already has, which leaves a request that does change the key renaming the filter as before. Patch 4 adds tdc coverage for all three, including the cross-bucket move case Sashiko noted route.json had no test for. [1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260829205422.854785-1-victor%40mojatatu.com ==================== Link: https://patch.msgid.link/20260907192133.2639067-1-victor@mojatatu.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions