[PATCH 0/2] wifi: mac80211: balance mesh path quota accounting

From: Zhao Li

Date: Wed Sep 16 2026 - 07:49:32 EST


The interface mesh path counter does not track the number of installed
paths. Failed mesh additions can exhaust the quota while the table stays
below the limit, and proxy-path churn can drive the counter negative and
let later mesh additions exceed MESH_MAX_MPATHS.

mesh_path_add() reserves quota before allocation, but its allocation,
insertion, and duplicate returns never roll it back. mpp_path_add() does
not reserve quota at all, even though the common free path decrements the
same counter for entries from both tables.

Make every successfully installed mesh or proxy path hold exactly one
shared reservation, and release it whenever an addition fails. The two
defects have different origins, so they are fixed in separate patches.

Validation used GCC W=1, Sparse C=2, and a controlled production-helper
accounting matrix. Allocation and insertion errors used test-only fault
injection; the concurrent duplicate path did not. A separate two-point
hwsim 802.11s run reached mesh_path_add() from HWMP PREQ/PREP processing
and mpp_path_add() from received mesh data with address extension. It
observed the proxy-accounting difference with identical table walks. No
physical-radio or layer-3 success is claimed.

Zhao Li (2):
wifi: mac80211: release mesh path quota on failed additions
wifi: mac80211: account proxy paths against the mesh path limit

net/mac80211/mesh_pathtbl.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)


base-commit: 50d3d79dc0743b616afb00d01a626c76758721f7
--
2.55.0