mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] wifi: unwind state after add_interface failures
@ 2026-09-24 13:19 Jiale Yao
  2026-09-24 13:19 ` [PATCH 1/4] wifi: mt76: mt7615: unwind " Jiale Yao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jiale Yao @ 2026-09-24 13:19 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
	Sean Wang, Matthias Brugger, AngeloGioacchino Del Regno,
	Runyu Xiao, Ming Yen Hsieh, Javier Tia, Leon Yen, Eason Lai,
	Sebastian Krzyszkowiak, Marek Vasut, Ville Nummela, Nelson Yu,
	Quan Zhou, Rong Yan, Deren Wu, Amitkumar Karwar, Kalle Valo,
	Prameela Rani Garnepudi, linux-wireless, linux-kernel,
	linux-arm-kernel, linux-mediatek
  Cc: Jiale Yao

mac80211 does not call remove_interface() when a driver's
add_interface() callback fails.  Drivers must therefore unwind all state
they published before returning the error.

Four wireless drivers leave vif pointers or resource reservations behind
when a firmware operation fails during interface creation.  Depending on
the driver, later RX, interrupt, or testmode paths can dereference the stale
vif, and leaked mask bits or counters can prevent subsequent interfaces
from being created.

Unwind the state at each failure point, following the approach used by
commit 2fb6480c52f6 ("wifi: mt76: mt7915: unwind state on add_interface
failure").  Each patch is independent and addresses one driver.

These paths were reviewed against the driver state transitions and their
remove_interface() counterparts.

Jiale Yao (4):
  wifi: mt76: mt7615: unwind add_interface failures
  wifi: mt76: mt7925: unwind link BSS add failures
  wifi: rsi: unwind add_interface failure
  wifi: mm81x: unwind add_interface failure

 .../net/wireless/mediatek/mt76/mt7615/main.c  | 19 ++++++++++++++++++-
 .../net/wireless/mediatek/mt76/mt7925/main.c  |  4 +++-
 drivers/net/wireless/morsemicro/mm81x/mac.c   |  9 ++++++++-
 drivers/net/wireless/rsi/rsi_91x_mac80211.c   |  2 ++
 4 files changed, 31 insertions(+), 3 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-09-24 13:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24 13:19 [PATCH 0/4] wifi: unwind state after add_interface failures Jiale Yao
2026-09-24 13:19 ` [PATCH 1/4] wifi: mt76: mt7615: unwind " Jiale Yao
2026-09-24 13:19 ` [PATCH 2/4] wifi: mt76: mt7925: unwind link BSS add failures Jiale Yao
2026-09-24 13:19 ` [PATCH 3/4] wifi: rsi: unwind add_interface failure Jiale Yao
2026-09-24 13:19 ` [PATCH 4/4] wifi: mm81x: " Jiale Yao

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®