Date: Sun, 5 Mar 2023 20:16:26 GMT From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 3689f8aeab82 - main - linux_80211: Don't dequeue lsta if not queued Message-ID: <202303052016.325KGQuf023321@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3689f8aeab82150da6789be87b6c2f9385810c23 commit 3689f8aeab82150da6789be87b6c2f9385810c23 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2023-03-05 20:10:57 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2023-03-05 20:16:22 +0000 linux_80211: Don't dequeue lsta if not queued This fixes an instapanic when restarting wpa_supplicant on my laptop's iwlwifi device. After this change, iwlwifi enters a nonfunctional state if wpa_supplicant is restarted, but "service netif restart wlan0" is enough to get it working again. releng/13.2 candidate. Reviewed by: bz MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index fdfa384c1a25..5b9792ed664e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -174,10 +174,13 @@ lkpi_lsta_remove(struct lkpi_sta *lsta, struct lkpi_vif *lvif) { struct ieee80211_node *ni; + IMPROVE("XXX-BZ remove tqe_prev check once ni-sta-state-sync is fixed"); + ni = lsta->ni; LKPI_80211_LVIF_LOCK(lvif); - TAILQ_REMOVE(&lvif->lsta_head, lsta, lsta_entry); + if (lsta->lsta_entry.tqe_prev != NULL) + TAILQ_REMOVE(&lvif->lsta_head, lsta, lsta_entry); LKPI_80211_LVIF_UNLOCK(lvif); lsta->ni = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303052016.325KGQuf023321>