mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 01:45:23 +07:00
wireless-drivers fixes for 4.11
iwlwifi * an RCU fix * a fix for a potential out-of-bounds access crash * a fix for IBSS which has been broken since DQA was enabled rtlwifi * fix scheduling while atomic regression brcmfmac * fix use-after-free bug found by KASAN -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJY4ivhAAoJEG4XJFUm622bnNQIAId7kE+dQjX/VRRCfZl5679K pkcooXgqCBODA03phCCa9pDGx8O2JPoPJzDgqthHJcpD03nmp8TbiCfuZY6VT2HK ohwydmwh2y614V7XrLmEJ6MRl06R2ihXZRMaasPf7LIydXHYo3JFU60XOTNRKrmE bDvukcNeKB6s/YuMBf4247qi6mpHuWMeTBVdzUo3Ht06JH6AK2F9M81IS2AiXojY lAQWWBBrQT6B7fiVMw4+wRux4Mirkzy/7WJIeFS5oGPFj4ha3gGQhddVHAj8Z9hA zQKQxojNLj89tFKqXV3JvDQe20/bNGN81ushkkcy4l8pPtHoJylD3ladPbiXMH8= =vv5x -----END PGP SIGNATURE----- Merge tag 'wireless-drivers-for-davem-2017-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.11 iwlwifi * an RCU fix * a fix for a potential out-of-bounds access crash * a fix for IBSS which has been broken since DQA was enabled rtlwifi * fix scheduling while atomic regression brcmfmac * fix use-after-free bug found by KASAN ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
2f5e9f8d98
@ -2238,14 +2238,16 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_priv(wiphy);
|
||||
struct brcmf_p2p_info *p2p = &cfg->p2p;
|
||||
struct brcmf_cfg80211_vif *vif;
|
||||
enum nl80211_iftype iftype;
|
||||
bool wait_for_disable = false;
|
||||
int err;
|
||||
|
||||
brcmf_dbg(TRACE, "delete P2P vif\n");
|
||||
vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
|
||||
|
||||
iftype = vif->wdev.iftype;
|
||||
brcmf_cfg80211_arm_vif_event(cfg, vif);
|
||||
switch (vif->wdev.iftype) {
|
||||
switch (iftype) {
|
||||
case NL80211_IFTYPE_P2P_CLIENT:
|
||||
if (test_bit(BRCMF_VIF_STATUS_DISCONNECTING, &vif->sme_state))
|
||||
wait_for_disable = true;
|
||||
@ -2275,7 +2277,7 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
BRCMF_P2P_DISABLE_TIMEOUT);
|
||||
|
||||
err = 0;
|
||||
if (vif->wdev.iftype != NL80211_IFTYPE_P2P_DEVICE) {
|
||||
if (iftype != NL80211_IFTYPE_P2P_DEVICE) {
|
||||
brcmf_vif_clear_mgmt_ies(vif);
|
||||
err = brcmf_p2p_release_p2p_if(vif);
|
||||
}
|
||||
@ -2291,7 +2293,7 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)
|
||||
brcmf_remove_interface(vif->ifp, true);
|
||||
|
||||
brcmf_cfg80211_arm_vif_event(cfg, NULL);
|
||||
if (vif->wdev.iftype != NL80211_IFTYPE_P2P_DEVICE)
|
||||
if (iftype != NL80211_IFTYPE_P2P_DEVICE)
|
||||
p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL;
|
||||
|
||||
return err;
|
||||
|
@ -1056,6 +1056,8 @@ static ssize_t iwl_dbgfs_fw_dbg_collect_write(struct iwl_mvm *mvm,
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
iwl_mvm_fw_dbg_collect(mvm, FW_DBG_TRIGGER_USER, buf,
|
||||
(count - 1), NULL);
|
||||
|
@ -216,7 +216,8 @@ u32 iwl_mvm_mac_get_queues_mask(struct ieee80211_vif *vif)
|
||||
qmask |= BIT(vif->hw_queue[ac]);
|
||||
}
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP)
|
||||
if (vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_ADHOC)
|
||||
qmask |= BIT(vif->cab_queue);
|
||||
|
||||
return qmask;
|
||||
|
@ -2401,7 +2401,7 @@ void iwl_mvm_sta_pm_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
|
||||
return;
|
||||
|
||||
rcu_read_lock();
|
||||
sta = mvm->fw_id_to_mac_id[notif->sta_id];
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[notif->sta_id]);
|
||||
if (WARN_ON(IS_ERR_OR_NULL(sta))) {
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
|
@ -1806,7 +1806,8 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
iwl_mvm_get_wd_timeout(mvm, vif, false, false);
|
||||
int queue;
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP)
|
||||
if (vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_ADHOC)
|
||||
queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
|
||||
else if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
|
||||
queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE;
|
||||
@ -1837,7 +1838,8 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
* enabled-cab_queue to the mask)
|
||||
*/
|
||||
if (iwl_mvm_is_dqa_supported(mvm) &&
|
||||
vif->type == NL80211_IFTYPE_AP) {
|
||||
(vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_ADHOC)) {
|
||||
struct iwl_trans_txq_scd_cfg cfg = {
|
||||
.fifo = IWL_MVM_TX_FIFO_MCAST,
|
||||
.sta_id = mvmvif->bcast_sta.sta_id,
|
||||
@ -1862,7 +1864,8 @@ static void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm *mvm,
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP)
|
||||
if (vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_ADHOC)
|
||||
iwl_mvm_disable_txq(mvm, vif->cab_queue, vif->cab_queue,
|
||||
IWL_MAX_TID_COUNT, 0);
|
||||
|
||||
|
@ -506,6 +506,7 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
|
||||
|
||||
switch (info->control.vif->type) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
/*
|
||||
* Handle legacy hostapd as well, where station may be added
|
||||
* only after assoc. Take care of the case where we send a
|
||||
@ -517,7 +518,8 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
|
||||
if (info->hw_queue == info->control.vif->cab_queue)
|
||||
return info->hw_queue;
|
||||
|
||||
WARN_ONCE(1, "fc=0x%02x", le16_to_cpu(fc));
|
||||
WARN_ONCE(info->control.vif->type != NL80211_IFTYPE_ADHOC,
|
||||
"fc=0x%02x", le16_to_cpu(fc));
|
||||
return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
|
||||
case NL80211_IFTYPE_P2P_DEVICE:
|
||||
if (ieee80211_is_mgmt(fc))
|
||||
@ -584,7 +586,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
|
||||
iwl_mvm_vif_from_mac80211(info.control.vif);
|
||||
|
||||
if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE ||
|
||||
info.control.vif->type == NL80211_IFTYPE_AP) {
|
||||
info.control.vif->type == NL80211_IFTYPE_AP ||
|
||||
info.control.vif->type == NL80211_IFTYPE_ADHOC) {
|
||||
sta_id = mvmvif->bcast_sta.sta_id;
|
||||
queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info,
|
||||
hdr->frame_control);
|
||||
|
@ -1742,12 +1742,14 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, u8 tag, u8 len, u8 *val)
|
||||
unsigned long flags;
|
||||
struct rtl_c2hcmd *c2hcmd;
|
||||
|
||||
c2hcmd = kmalloc(sizeof(*c2hcmd), GFP_KERNEL);
|
||||
c2hcmd = kmalloc(sizeof(*c2hcmd),
|
||||
in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
|
||||
if (!c2hcmd)
|
||||
goto label_err;
|
||||
|
||||
c2hcmd->val = kmalloc(len, GFP_KERNEL);
|
||||
c2hcmd->val = kmalloc(len,
|
||||
in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
|
||||
if (!c2hcmd->val)
|
||||
goto label_err2;
|
||||
|
Loading…
Reference in New Issue
Block a user