Skip to content

net/sched: fix action batch deletion cleanup

Xuanqiang Luo linux-kselftest lkml netdev stable 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net/sched: act_api: release tail references on DELACTION failurenet/sched/act_api.c+8 -30 repliesApplied
2/2selftests: tc-testing: test action batch deletion failure cleanuptools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json+115 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net v1 0/2] net/sched: fix action batch deletion cleanup

From: Xuanqiang Luo <[email protected]>

Batched RTM_DELACTION requests can leak references to unprocessed actions when deletion stops at a filter-bound action.

Patch 1 fixes the failure cleanup.

Patch 2 adds tc-testing regression coverage.

Failure reproduction (key output excerpts):

python3 tdc.py -f /root/tc-testing/batch-delete.json

not ok 1 d710 - Release tail references after first action deletion fails
Could not match regex pattern. Verify command output:
[...]
index 2 ref 2 bind 0
[...]
index 3 ref 2 bind 0

not ok 2 d711 - Release tail references after middle action deletion fails
Could not match regex pattern. Verify command output:
[...]
index 3 ref 2 bind 0

not ok 3 d713 - Delete a tail action once after a failed batch
Could not match regex pattern. Verify command output:
total acts 2
[...]
index 2 ref 1 bind 0

Xuanqiang Luo (2):
net/sched: act_api: release tail references on DELACTION failure
selftests: tc-testing: test action batch deletion failure cleanup

 net/sched/act_api.c                           |  11 +-
 .../tc-tests/actions/batch-delete.json        | 115 ++++++++++++++++++
 2 files changed, 123 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json

base-commit: 7f26a5e8040b4957ef4dbdfcde6cc7ba2db53937

Signature · 1 line
2.43.0