* pull-request: mac80211 2012-11-09
@ 2012-11-09 19:42 Johannes Berg
2012-11-09 19:49 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg
2012-11-10 7:54 ` pull-request: mac80211 2012-11-09 Johannes Berg
0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2012-11-09 19:42 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]
John,
Here are five more fixes from me for 3.7. There's no theme to them, just
various changes all over mac80211, see the commit logs for more
information.
Please pull, information below.
johannes
The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832:
mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john
for you to fetch changes up to 20f544eea03db4b498942558b882d463ce575c3e:
mac80211: don't send null data packet when not associated (2012-11-09 17:31:47 +0100)
----------------------------------------------------------------
Arik Nemtsov (1):
mac80211: sync acccess to tx_filtered/ps_tx_buf queues
David Spinadel (1):
mac80211: init sched_scan_ies
Felix Fietkau (1):
mac80211: do not call ieee80211_configure_filter if no interfaces are up
Johannes Berg (2):
mac80211: fix memory leak in device registration error path
mac80211: don't send null data packet when not associated
net/mac80211/cfg.c | 3 +++
net/mac80211/main.c | 6 ++++--
net/mac80211/scan.c | 2 +-
net/mac80211/sta_info.c | 5 +++++
net/mac80211/util.c | 2 ++
5 files changed, 15 insertions(+), 3 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] iwlwifi: handle DMA mapping failures 2012-11-09 19:42 pull-request: mac80211 2012-11-09 Johannes Berg @ 2012-11-09 19:49 ` Johannes Berg 2012-11-09 19:49 ` [PATCH 2/2] iwlwifi: use ieee80211_free_txskb Johannes Berg 2012-11-09 19:50 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg 2012-11-10 7:54 ` pull-request: mac80211 2012-11-09 Johannes Berg 1 sibling, 2 replies; 8+ messages in thread From: Johannes Berg @ 2012-11-09 19:49 UTC (permalink / raw) To: linux-wireless; +Cc: Johannes Berg From: Johannes Berg <johannes.berg@intel.com> The RX replenish code doesn't handle DMA mapping failures, which will cause issues if there actually is a failure. This was reported by Shuah Khan who found a DMA mapping framework warning ("device driver failed to check map error"). Cc: stable@vger.kernel.org Reported-by: Shuah Khan <shuah.khan@hp.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> --- drivers/net/wireless/iwlwifi/pcie/rx.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 17c8e5d..bb69f8f 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c @@ -321,6 +321,14 @@ static void iwl_rx_allocate(struct iwl_trans *trans, gfp_t priority) dma_map_page(trans->dev, page, 0, PAGE_SIZE << trans_pcie->rx_page_order, DMA_FROM_DEVICE); + if (dma_mapping_error(trans->dev, rxb->page_dma)) { + rxb->page = NULL; + spin_lock_irqsave(&rxq->lock, flags); + list_add(&rxb->list, &rxq->rx_used); + spin_unlock_irqrestore(&rxq->lock, flags); + __free_pages(page, trans_pcie->rx_page_order); + return; + } /* dma address must be no more than 36 bits */ BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); /* and also 256 byte aligned! */ @@ -488,8 +496,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, dma_map_page(trans->dev, rxb->page, 0, PAGE_SIZE << trans_pcie->rx_page_order, DMA_FROM_DEVICE); - list_add_tail(&rxb->list, &rxq->rx_free); - rxq->free_count++; + if (dma_mapping_error(trans->dev, rxb->page_dma)) { + /* + * free the page(s) as well to not break + * the invariant that the items on the used + * list have no page(s) + */ + __free_pages(rxb->page, trans_pcie->rx_page_order); + rxb->page = NULL; + list_add_tail(&rxb->list, &rxq->rx_used); + } else { + list_add_tail(&rxb->list, &rxq->rx_free); + rxq->free_count++; + } } else list_add_tail(&rxb->list, &rxq->rx_used); spin_unlock_irqrestore(&rxq->lock, flags); -- 1.8.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] iwlwifi: use ieee80211_free_txskb 2012-11-09 19:49 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg @ 2012-11-09 19:49 ` Johannes Berg 2012-11-09 19:50 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg 1 sibling, 0 replies; 8+ messages in thread From: Johannes Berg @ 2012-11-09 19:49 UTC (permalink / raw) To: linux-wireless; +Cc: Johannes Berg From: Johannes Berg <johannes.berg@intel.com> To let mac80211 clean up any TX information when a frame is dropped, use ieee80211_free_txskb(). Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> --- drivers/net/wireless/iwlwifi/dvm/mac80211.c | 2 +- drivers/net/wireless/iwlwifi/dvm/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index ff8162d..fa4d1b8 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c @@ -521,7 +521,7 @@ static void iwlagn_mac_tx(struct ieee80211_hw *hw, ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); if (iwlagn_tx_skb(priv, control->sta, skb)) - dev_kfree_skb_any(skb); + ieee80211_free_txskb(hw, skb); } static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw, diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 7ff3f14..408132c 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c @@ -2114,7 +2114,7 @@ static void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) info = IEEE80211_SKB_CB(skb); iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); - dev_kfree_skb_any(skb); + ieee80211_free_txskb(priv->hw, skb); } static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) -- 1.8.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] iwlwifi: handle DMA mapping failures 2012-11-09 19:49 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg 2012-11-09 19:49 ` [PATCH 2/2] iwlwifi: use ieee80211_free_txskb Johannes Berg @ 2012-11-09 19:50 ` Johannes Berg 1 sibling, 0 replies; 8+ messages in thread From: Johannes Berg @ 2012-11-09 19:50 UTC (permalink / raw) To: linux-wireless Err, ok, copy/paste bug -- I meant to have these as replies to the *iwlwifi* pull request, not the *mac80211* one. Sorry about that! johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pull-request: mac80211 2012-11-09 2012-11-09 19:42 pull-request: mac80211 2012-11-09 Johannes Berg 2012-11-09 19:49 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg @ 2012-11-10 7:54 ` Johannes Berg 2012-11-12 9:01 ` pull-request: mac80211 2012-11-12 Johannes Berg 1 sibling, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-10 7:54 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless On Fri, 2012-11-09 at 20:42 +0100, Johannes Berg wrote: > John, > > Here are five more fixes from me for 3.7. There's no theme to them, just > various changes all over mac80211, see the commit logs for more > information. Hmm, Felix has another txskb fix, I'll send a new pull request on Monday, please ignore this one. johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* pull-request: mac80211 2012-11-12 2012-11-10 7:54 ` pull-request: mac80211 2012-11-09 Johannes Berg @ 2012-11-12 9:01 ` Johannes Berg 2012-11-12 15:27 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-12 9:01 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless [-- Attachment #1: Type: text/plain, Size: 1920 bytes --] Another day, updated pull request. I'm going to let you merge this one, even if somebody sends me new fixes right now :) I have a locking fix for some SKB queues, a variable initialization to avoid crashes in a certain failure case, another free_txskb fix from Felix and another fix from him to avoid calling a stopped driver, a fix for a (very unlikely) memory leak and a fix to not send null data packets when resuming while not associated. Please pull, the entire pull request is below. johannes The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832: mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john for you to fetch changes up to 1f98ab7fef48a2968f37f422c256c9fbd978c3f0: mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge (2012-11-10 21:26:28 +0100) ---------------------------------------------------------------- Arik Nemtsov (1): mac80211: sync acccess to tx_filtered/ps_tx_buf queues David Spinadel (1): mac80211: init sched_scan_ies Felix Fietkau (2): mac80211: do not call ieee80211_configure_filter if no interfaces are up mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge Johannes Berg (2): mac80211: fix memory leak in device registration error path mac80211: don't send null data packet when not associated net/mac80211/cfg.c | 3 +++ net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/main.c | 6 ++++-- net/mac80211/scan.c | 2 +- net/mac80211/sta_info.c | 11 ++++++++--- net/mac80211/status.c | 9 +++++++++ net/mac80211/tx.c | 9 ++++++--- net/mac80211/util.c | 2 ++ 8 files changed, 35 insertions(+), 9 deletions(-) [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pull-request: mac80211 2012-11-12 2012-11-12 9:01 ` pull-request: mac80211 2012-11-12 Johannes Berg @ 2012-11-12 15:27 ` Johannes Berg 2012-11-14 19:16 ` John W. Linville 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-12 15:27 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless [-- Attachment #1: Type: text/plain, Size: 2100 bytes --] On Mon, 2012-11-12 at 10:01 +0100, Johannes Berg wrote: > Another day, updated pull request. I'm going to let you merge this one, > even if somebody sends me new fixes right now :) > > I have a locking fix for some SKB queues, a variable initialization to > avoid crashes in a certain failure case, another free_txskb fix from > Felix and another fix from him to avoid calling a stopped driver, a fix > for a (very unlikely) memory leak and a fix to not send null data > packets when resuming while not associated. I've amended the branch again, with the regulatory fix. Sorry about that! johannes The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832: mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john for you to fetch changes up to 43c771a1963ab461a2f194e3c97fded1d5fe262f: wireless: allow 40 MHz on world roaming channels 12/13 (2012-11-12 16:26:06 +0100) ---------------------------------------------------------------- Arik Nemtsov (1): mac80211: sync acccess to tx_filtered/ps_tx_buf queues David Spinadel (1): mac80211: init sched_scan_ies Felix Fietkau (2): mac80211: do not call ieee80211_configure_filter if no interfaces are up mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge Johannes Berg (3): mac80211: fix memory leak in device registration error path mac80211: don't send null data packet when not associated wireless: allow 40 MHz on world roaming channels 12/13 net/mac80211/cfg.c | 3 +++ net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/main.c | 6 ++++-- net/mac80211/scan.c | 2 +- net/mac80211/sta_info.c | 11 ++++++++--- net/mac80211/status.c | 9 +++++++++ net/mac80211/tx.c | 9 ++++++--- net/mac80211/util.c | 2 ++ net/wireless/reg.c | 5 ++--- 9 files changed, 37 insertions(+), 12 deletions(-) [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pull-request: mac80211 2012-11-12 2012-11-12 15:27 ` Johannes Berg @ 2012-11-14 19:16 ` John W. Linville 0 siblings, 0 replies; 8+ messages in thread From: John W. Linville @ 2012-11-14 19:16 UTC (permalink / raw) To: Johannes Berg; +Cc: linux-wireless On Mon, Nov 12, 2012 at 04:27:41PM +0100, Johannes Berg wrote: > On Mon, 2012-11-12 at 10:01 +0100, Johannes Berg wrote: > > Another day, updated pull request. I'm going to let you merge this one, > > even if somebody sends me new fixes right now :) > > > > I have a locking fix for some SKB queues, a variable initialization to > > avoid crashes in a certain failure case, another free_txskb fix from > > Felix and another fix from him to avoid calling a stopped driver, a fix > > for a (very unlikely) memory leak and a fix to not send null data > > packets when resuming while not associated. > > I've amended the branch again, with the regulatory fix. Sorry about > that! > > johannes I pulled this one... :-) > The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832: > > mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john > > for you to fetch changes up to 43c771a1963ab461a2f194e3c97fded1d5fe262f: > > wireless: allow 40 MHz on world roaming channels 12/13 (2012-11-12 16:26:06 +0100) > > ---------------------------------------------------------------- > Arik Nemtsov (1): > mac80211: sync acccess to tx_filtered/ps_tx_buf queues > > David Spinadel (1): > mac80211: init sched_scan_ies > > Felix Fietkau (2): > mac80211: do not call ieee80211_configure_filter if no interfaces are up > mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge > > Johannes Berg (3): > mac80211: fix memory leak in device registration error path > mac80211: don't send null data packet when not associated > wireless: allow 40 MHz on world roaming channels 12/13 > > net/mac80211/cfg.c | 3 +++ > net/mac80211/ieee80211_i.h | 2 ++ > net/mac80211/main.c | 6 ++++-- > net/mac80211/scan.c | 2 +- > net/mac80211/sta_info.c | 11 ++++++++--- > net/mac80211/status.c | 9 +++++++++ > net/mac80211/tx.c | 9 ++++++--- > net/mac80211/util.c | 2 ++ > net/wireless/reg.c | 5 ++--- > 9 files changed, 37 insertions(+), 12 deletions(-) > -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-14 19:31 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-09 19:42 pull-request: mac80211 2012-11-09 Johannes Berg 2012-11-09 19:49 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg 2012-11-09 19:49 ` [PATCH 2/2] iwlwifi: use ieee80211_free_txskb Johannes Berg 2012-11-09 19:50 ` [PATCH 1/2] iwlwifi: handle DMA mapping failures Johannes Berg 2012-11-10 7:54 ` pull-request: mac80211 2012-11-09 Johannes Berg 2012-11-12 9:01 ` pull-request: mac80211 2012-11-12 Johannes Berg 2012-11-12 15:27 ` Johannes Berg 2012-11-14 19:16 ` John W. Linville
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.