mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: mac80211: balance mesh path quota accounting
@ 2026-09-16 11:36 Zhao Li
  2026-09-16 11:36 ` [PATCH 1/2] wifi: mac80211: release mesh path quota on failed additions Zhao Li
  2026-09-16 11:36 ` [PATCH 2/2] wifi: mac80211: account proxy paths against the mesh path limit Zhao Li
  0 siblings, 2 replies; 3+ messages in thread
From: Zhao Li @ 2026-09-16 11:36 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Bob Copeland, linux-wireless, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-16 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 11:36 [PATCH 0/2] wifi: mac80211: balance mesh path quota accounting Zhao Li
2026-09-16 11:36 ` [PATCH 1/2] wifi: mac80211: release mesh path quota on failed additions Zhao Li
2026-09-16 11:36 ` [PATCH 2/2] wifi: mac80211: account proxy paths against the mesh path limit Zhao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®