mt76: fix possible NULL pointer dereference in mt76_tx
[ Upstream commitd7400a2f3e] Even if this is not a real issue since mt76_tx is never run with wcid set to NULL, fix a theoretical NULL pointer dereference in mt76_tx routine Fixes:db9f11d343("mt76: store wcid tx rate info in one u32 reduce locking") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e717f974ce
commit
6987ee9bf0
1 changed files with 1 additions and 1 deletions
|
|
@ -278,7 +278,7 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
|
|||
skb_set_queue_mapping(skb, qid);
|
||||
}
|
||||
|
||||
if (!(wcid->tx_info & MT_WCID_TX_INFO_SET))
|
||||
if (wcid && !(wcid->tx_info & MT_WCID_TX_INFO_SET))
|
||||
ieee80211_get_tx_rates(info->control.vif, sta, skb,
|
||||
info->control.rates, 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue