Skip to contentSkip to conversation

mt76: mt7915: fix locking bug in mt7915_sta_rc_update()

PATCH New Dan Carpenter 1 participant 1 message May 20, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mt76: mt7915: fix locking bug in mt7915_sta_rc_update()

This function calls rcu_read_lock() twice instead of unlocking.

Fixes e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
---
 drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +1 -1
index 98567374c2c9..3f00f5439c7c 100644
@@ -790,7 +790,7 @@ mt7915_sta_rc_update(struct ieee80211_hw *hw,
 		rcu_read_unlock();
 		return;
 	}
-	rcu_read_lock();
+	rcu_read_unlock();
 
 	set_bit(changed, &msta->stats.changed);
 	ieee80211_queue_work(hw, &msta->stats_work);
Signature · 1 line
2.26.2