summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorZihan Xi <zihanx@nebusec.ai>2026-10-05 13:06:18 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2026-11-16 01:40:30 +0100
commitd4e4cd04de2c47ed05f837a26edd20c56be3f097 (patch)
tree2577141596c9288f93226ddcf6cd5f682e06d541 /tools/perf/scripts/python/stackcollapse.py
parent5ae07c10854f7ac38da02e8313a59dfcfeb44a61 (diff)
ipvs: avoid stack overflow from recursive connection expiration
When a controlled IPVS connection expires, its controller may be expired synchronously if it has no remaining controlled connections. A chain of controlled connections can then recurse through ip_vs_conn_expire() and exhaust the kernel stack during namespace cleanup. Continue expiration with the controller after the current connection has been fully cleaned up instead of calling ip_vs_conn_del() recursively. Keep the expiration walk under RCU, preserve the immediate-drop timeout for a controller with its own controller, and switch to deletion mode before the next iteration. This keeps controlled-connection cleanup synchronous while using one stack frame for the whole chain. The timer callback race during connection deletion is handled by the preceding connection-deletion fix. This patch depends on "ipvs: fix problems during connection deletion" to protect the iterative controller cleanup from the timer callback race. Fixes: f9200a52eedf ("ipvs: avoid expiring many connections from timer") Cc: stable@vger.kernel.org Reported-by: Vega <vega@nebusec.ai> Co-developed-by: Luxing Yin <root@tr0jan.top> Signed-off-by: Luxing Yin <root@tr0jan.top> Signed-off-by: Zihan Xi <zihanx@nebusec.ai> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions