* [PATCH AUTOSEL 6.8 10/25] wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
[not found] <20240407131130.1050321-1-sashal@kernel.org>
@ 2024-04-07 13:10 ` Sasha Levin
2024-04-07 13:10 ` [PATCH AUTOSEL 6.8 11/25] wifi: cfg80211: fix rdev_dump_mpp() arguments order Sasha Levin
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-04-07 13:10 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jeff Johnson, Simon Horman, Johannes Berg, Sasha Levin, johannes,
davem, edumazet, kuba, pabeni, linux-wireless, netdev
From: Jeff Johnson <quic_jjohnson@quicinc.com>
[ Upstream commit 774f8841f55d7ac4044c79812691649da203584a ]
Running kernel-doc on ieee80211_i.h flagged the following:
net/mac80211/ieee80211_i.h:145: warning: expecting prototype for enum ieee80211_corrupt_data_flags. Prototype was for enum ieee80211_bss_corrupt_data_flags instead
net/mac80211/ieee80211_i.h:162: warning: expecting prototype for enum ieee80211_valid_data_flags. Prototype was for enum ieee80211_bss_valid_data_flags instead
Fix these warnings.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://msgid.link/20240314-kdoc-ieee80211_i-v1-1-72b91b55b257@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/ieee80211_i.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 0b2b53550bd99..c649ee6c4815d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -131,7 +131,7 @@ struct ieee80211_bss {
};
/**
- * enum ieee80211_corrupt_data_flags - BSS data corruption flags
+ * enum ieee80211_bss_corrupt_data_flags - BSS data corruption flags
* @IEEE80211_BSS_CORRUPT_BEACON: last beacon frame received was corrupted
* @IEEE80211_BSS_CORRUPT_PROBE_RESP: last probe response received was corrupted
*
@@ -144,7 +144,7 @@ enum ieee80211_bss_corrupt_data_flags {
};
/**
- * enum ieee80211_valid_data_flags - BSS valid data flags
+ * enum ieee80211_bss_valid_data_flags - BSS valid data flags
* @IEEE80211_BSS_VALID_WMM: WMM/UAPSD data was gathered from non-corrupt IE
* @IEEE80211_BSS_VALID_RATES: Supported rates were gathered from non-corrupt IE
* @IEEE80211_BSS_VALID_ERP: ERP flag was gathered from non-corrupt IE
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 6.8 11/25] wifi: cfg80211: fix rdev_dump_mpp() arguments order
[not found] <20240407131130.1050321-1-sashal@kernel.org>
2024-04-07 13:10 ` [PATCH AUTOSEL 6.8 10/25] wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc Sasha Levin
@ 2024-04-07 13:10 ` Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 12/25] wifi: mac80211: fix prep_connection error path Sasha Levin
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-04-07 13:10 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Igor Artemiev, Johannes Berg, Sasha Levin, johannes, davem,
edumazet, kuba, pabeni, linux-wireless, netdev
From: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
[ Upstream commit ec50f3114e55406a1aad24b7dfaa1c3f4336d8eb ]
Fix the order of arguments in the TP_ARGS macro
for the rdev_dump_mpp tracepoint event.
Found by Linux Verification Center (linuxtesting.org).
Signed-off-by: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
Link: https://msgid.link/20240311164519.118398-1-Igor.A.Artemiev@mcst.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 1f374c8a17a50..cc3fd4177bcee 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1013,7 +1013,7 @@ TRACE_EVENT(rdev_get_mpp,
TRACE_EVENT(rdev_dump_mpp,
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
u8 *dst, u8 *mpp),
- TP_ARGS(wiphy, netdev, _idx, mpp, dst),
+ TP_ARGS(wiphy, netdev, _idx, dst, mpp),
TP_STRUCT__entry(
WIPHY_ENTRY
NETDEV_ENTRY
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 6.8 12/25] wifi: mac80211: fix prep_connection error path
[not found] <20240407131130.1050321-1-sashal@kernel.org>
2024-04-07 13:10 ` [PATCH AUTOSEL 6.8 10/25] wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc Sasha Levin
2024-04-07 13:10 ` [PATCH AUTOSEL 6.8 11/25] wifi: cfg80211: fix rdev_dump_mpp() arguments order Sasha Levin
@ 2024-04-07 13:11 ` Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 13/25] wifi: iwlwifi: read txq->read_ptr under lock Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 14/25] wifi: iwlwifi: mvm: guard against invalid STA ID on removal Sasha Levin
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-04-07 13:11 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Johannes Berg, Miri Korenblit, Sasha Levin, johannes, davem,
edumazet, kuba, pabeni, linux-wireless, netdev
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit 2e6bd24339a6ff04413b2e49c0f2672d6f0edfa5 ]
If prep_channel fails in prep_connection, the code releases
the deflink's chanctx, which is wrong since we may be using
a different link. It's already wrong to even do that always
though, since we might still have the station. Remove it
only if prep_channel succeeded and later updates fail.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240318184907.2780c1f08c3d.I033c9b15483933088f32a2c0789612a33dd33d82@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/mlme.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 20d863370796d..90531ff2590c1 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -7291,7 +7291,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
sdata_info(sdata,
"failed to insert STA entry for the AP (error %d)\n",
err);
- goto out_err;
+ goto out_release_chan;
}
} else
WARN_ON_ONCE(!ether_addr_equal(link->u.mgd.bssid, cbss->bssid));
@@ -7302,8 +7302,9 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
return 0;
+out_release_chan:
+ ieee80211_link_release_channel(link);
out_err:
- ieee80211_link_release_channel(&sdata->deflink);
ieee80211_vif_set_links(sdata, 0, 0);
return err;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 6.8 13/25] wifi: iwlwifi: read txq->read_ptr under lock
[not found] <20240407131130.1050321-1-sashal@kernel.org>
` (2 preceding siblings ...)
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 12/25] wifi: mac80211: fix prep_connection error path Sasha Levin
@ 2024-04-07 13:11 ` Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 14/25] wifi: iwlwifi: mvm: guard against invalid STA ID on removal Sasha Levin
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-04-07 13:11 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Johannes Berg, Miri Korenblit, Sasha Levin, kvalo,
gregory.greenman, kuba, pagadala.yesu.anjaneyulu, linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit c2ace6300600c634553657785dfe5ea0ed688ac2 ]
If we read txq->read_ptr without lock, we can read the same
value twice, then obtain the lock, and reclaim from there
to two different places, but crucially reclaim the same
entry twice, resulting in the WARN_ONCE() a little later.
Fix that by reading txq->read_ptr under lock.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240319100755.bf4c62196504.I978a7ca56c6bd6f1bf42c15aa923ba03366a840b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/intel/iwlwifi/queue/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/queue/tx.c b/drivers/net/wireless/intel/iwlwifi/queue/tx.c
index ca74b1b63cac1..0efa304904bd3 100644
--- a/drivers/net/wireless/intel/iwlwifi/queue/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/queue/tx.c
@@ -1588,9 +1588,9 @@ void iwl_txq_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
return;
tfd_num = iwl_txq_get_cmd_index(txq, ssn);
- read_ptr = iwl_txq_get_cmd_index(txq, txq->read_ptr);
spin_lock_bh(&txq->lock);
+ read_ptr = iwl_txq_get_cmd_index(txq, txq->read_ptr);
if (!test_bit(txq_id, trans->txqs.queue_used)) {
IWL_DEBUG_TX_QUEUES(trans, "Q %d inactive - ignoring idx %d\n",
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 6.8 14/25] wifi: iwlwifi: mvm: guard against invalid STA ID on removal
[not found] <20240407131130.1050321-1-sashal@kernel.org>
` (3 preceding siblings ...)
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 13/25] wifi: iwlwifi: read txq->read_ptr under lock Sasha Levin
@ 2024-04-07 13:11 ` Sasha Levin
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-04-07 13:11 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Benjamin Berg, Miri Korenblit, Johannes Berg, Sasha Levin, kvalo,
gregory.greenman, emmanuel.grumbach, dan.carpenter,
mukesh.sisodiya, avraham.stern, linux-wireless
From: Benjamin Berg <benjamin.berg@intel.com>
[ Upstream commit 17f64517bf5c26af56b6c3566273aad6646c3c4f ]
Guard against invalid station IDs in iwl_mvm_mld_rm_sta_id as that would
result in out-of-bounds array accesses. This prevents issues should the
driver get into a bad state during error handling.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.d523167bda9c.I1cffd86363805bf86a95d8bdfd4b438bb54baddc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
index 1628bf55458fc..23e64a757cfe8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
@@ -855,10 +855,15 @@ int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id)
{
- int ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
+ int ret;
lockdep_assert_held(&mvm->mutex);
+ if (WARN_ON(sta_id == IWL_MVM_INVALID_STA))
+ return 0;
+
+ ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
+
RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL);
RCU_INIT_POINTER(mvm->fw_id_to_link_sta[sta_id], NULL);
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-07 13:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240407131130.1050321-1-sashal@kernel.org>
2024-04-07 13:10 ` [PATCH AUTOSEL 6.8 10/25] wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc Sasha Levin
2024-04-07 13:10 ` [PATCH AUTOSEL 6.8 11/25] wifi: cfg80211: fix rdev_dump_mpp() arguments order Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 12/25] wifi: mac80211: fix prep_connection error path Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 13/25] wifi: iwlwifi: read txq->read_ptr under lock Sasha Levin
2024-04-07 13:11 ` [PATCH AUTOSEL 6.8 14/25] wifi: iwlwifi: mvm: guard against invalid STA ID on removal Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).