blob: b79c007b3e1abefa27719355690826a217a13bcc [file] [log] [blame]
developer1f55fcf2024-10-17 14:52:33 +08001From e509c27732a53efc496081261df1c80b22a02b45 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
developer1f55fcf2024-10-17 14:52:33 +08004Subject: [PATCH 156/193] 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
developer1f55fcf2024-10-17 14:52:33 +080013index ee505a5..3cd034c 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