From: Xuanqiang Luo <[email protected]>
Failed batched RTM_NEWACTION requests can leak action references and
reserved IDR indices when cleanup encounters 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 tc-tests/actions/gact-rollback.json
not ok 1 e3b1 - Failed action batch releases a bound action reference
Could not match regex pattern. Verify command output:
[...]
index 1 ref 3 bind 1
not ok 2 e3b2 - Failed action batch releases entries after a bound action
Command exited with 255, expected 0
RTNETLINK answers: Resource temporarily unavailable
We have an error talking to the kernel
not ok 3 e3b3 - Failed action batch releases repeated references to a bound
action
Could not match regex pattern. Verify command output:
[...]
index 1 ref 4 bind 1
Xuanqiang Luo (2):
net/sched: act_api: release all action references on NEWACTION failure
selftests: tc-testing: test action batch failure cleanup
net/sched/act_api.c | 9 +--
.../tc-tests/actions/gact-rollback.json | 78 +++++++++++++++++++
2 files changed, 80 insertions(+), 7 deletions(-)
create mode 100644
tools/testing/selftests/tc-testing/tc-tests/actions/gact-rollback.json
base-commit: a401a9d547c50ef34db1088cc1fb9a201a7af657
--
2.43.0