Skip to content

wifi: unwind state after add_interface failures

Jiale Yao linux-arm-kernel linux-mediatek linux-wireless lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4wifi: mt76: mt7615: unwind add_interface failuresdrivers/net/wireless/mediatek/mt76/mt7615/main.c+18 -10 replies
2/4wifi: mt76: mt7925: unwind link BSS add failuresdrivers/net/wireless/mediatek/mt76/mt7925/main.c+3 -10 replies
3/4wifi: rsi: unwind add_interface failuredrivers/net/wireless/rsi/rsi_91x_mac80211.c+2 -00 replies
4/4wifi: mm81x: unwind add_interface failuredrivers/net/wireless/morsemicro/mm81x/mac.c+8 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] wifi: unwind state after add_interface failures

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(-)
Signature · 1 line
2.34.1