blob: 36029cfdeb6f38cfeaf5ebf1d4f2f26cdb0fe8f1 [file] [log] [blame]
developerd0c89452024-10-11 16:53:27 +08001From 59aecb430cc995720c5fa10353fb68372952f0df Mon Sep 17 00:00:00 2001
developer05f3b2b2024-08-19 19:17:34 +08002From: Bo Jiao <Bo.Jiao@mediatek.com>
3Date: Thu, 27 Jun 2024 14:54:38 +0800
developerd0c89452024-10-11 16:53:27 +08004Subject: [PATCH 156/223] mtk: mt76: mt7996: Fix NULL pointer crash when mac tx
developer05f3b2b2024-08-19 19:17:34 +08005 free with a msta that has been removed.
6
7Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
8---
9 mt7996/mac.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/mt7996/mac.c b/mt7996/mac.c
developerd0c89452024-10-11 16:53:27 +080013index ee505a55..3cd034cd 100644
developer05f3b2b2024-08-19 19:17:34 +080014--- a/mt7996/mac.c
15+++ b/mt7996/mac.c
developerd0c89452024-10-11 16:53:27 +080016@@ -1212,7 +1212,7 @@ mt7996_mac_tx_free(struct mt7996_dev *dev, void *data, int len)
developer05f3b2b2024-08-19 19:17:34 +080017 struct mt7996_link_sta *mlink =
18 rcu_dereference(msta->link[link_id]);
19
20- if (list_empty(&mlink->wcid.poll_list))
21+ if (mlink && list_empty(&mlink->wcid.poll_list))
22 list_add_tail(&mlink->wcid.poll_list, &mdev->sta_poll_list);
23 }
24 spin_unlock_bh(&mdev->sta_poll_lock);
25--
developerd0c89452024-10-11 16:53:27 +0800262.45.2
developer05f3b2b2024-08-19 19:17:34 +080027