summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorXuanqiang Luo <luoxuanqiang@kylinos.cn>2026-09-09 15:03:35 +0800
committerJakub Kicinski <kuba@kernel.org>2026-09-10 09:06:05 -0700
commit478eb5abb51931a152abab068f8a717b7ff480fd (patch)
tree00d7d67e4c0fb1ab2af4484bc8f6ab3c90eb1f03 /scripts
parentfc266a5dd99c4584c985b8b687c750598500a7ae (diff)
downloadlinux-478eb5abb51931a152abab068f8a717b7ff480fd.tar.gz
linux-478eb5abb51931a152abab068f8a717b7ff480fd.zip
net/sched: act_api: release all action references on NEWACTION failure
When a batched RTM_NEWACTION request replaces an existing action, tcf_idr_check_alloc() takes a temporary reference on it. If a later action fails to initialize, tcf_action_destroy() uses strict release semantics to clean up the actions initialized so far. For an action bound to a filter, the strict check returns -EPERM without dropping the temporary reference. This error also makes tcf_action_destroy() return before releasing subsequent entries. Any new action initialized between the bound action and the failing entry is leaked together with its reserved IDR slot, preventing reuse of its index. Use tcf_idr_release() to drop each reference held by the batch without rejecting bound actions. This allows cleanup to continue through all initialized entries and preserves the module reference release when an action is destroyed. Explicit action deletion and flushing retain their separate bind-count checks. Fixes: 55334a5db5cd ("net_sched: act: refuse to remove bound action outside") Cc: stable@vger.kernel.org Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20260909070336.32979-2-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions