linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix race condition caused by late addBA resp
@ 2011-11-27  7:23 Nikolay Martynov
  2011-11-27  7:23 ` Nikolay Martynov
  0 siblings, 1 reply; 15+ messages in thread
From: Nikolay Martynov @ 2011-11-27  7:23 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Nikolay Martynov

  Currently if addBA respones comes in just after addba_resp_timer has
expired we still accept addBA response and (try to) open agg
session. This patch fixes this race condition and makes sure that if
addba_resp_timer has expired addBA response is not longer accepted and
we do not try to open half-closed session.

  It looks like this is related to discussion of iwlagn being
'shaky'. I have intel wifi 5300 and experienced complete system locks
from time to time. And sometimes I get the following in logs
(i.e. this is the last thing which gets into log before system freezes):

Nov 26 23:50:09 kolya-laptop kernel: [147253.552830] Open BA session requested for 00:14:d1:53:50:2d tid 0
Nov 26 23:50:09 kolya-laptop kernel: [147253.564129] activated addBA response timer on tid 0
Nov 26 23:50:10 kolya-laptop kernel: [147254.564025] addBA response timer expired on tid 0
Nov 26 23:50:10 kolya-laptop kernel: [147254.564048] Tx BA session stop requested for 00:14:d1:53:50:2d tid 0
Nov 26 23:50:13 kolya-laptop kernel: [147257.089647] switched off addBA timer for tid 0
Nov 26 23:50:13 kolya-laptop kernel: [147257.089653] Aggregation is on for tid 0
Nov 26 23:50:13 kolya-laptop kernel: [147257.089817] iwlwifi 0000:0b:00.0: Tx aggregation enabled on ra = 00:14:d1:53:50:2d tid = 0
Nov 26 23:50:13 kolya-laptop kernel: [147257.089829] ------------[ cut here ]------------
Nov 26 23:50:13 kolya-laptop kernel: [147257.089849] WARNING: at /home/kolya/projects/wireless/compat-wireless/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:1106 iwl_trans_pcie_tx+0x9d2/0x9e0 [iwlwifi]()
... part of stack trace which got to disk before lock ...

  It can be seen here that session response timer gets expired which
brings agg session down. Shorty after addba resp arrives which tries to bring
that same session up. And it looks like this causes driver confusion and
subsequent system freeze.
  This patch seems to fix the problem for me. Didn't have system
freezes since I've applied it couple of days ago.

  All comments and suggestions are really appreciated.
  Thanks.

Nikolay Martynov (1):
  mac80211: fix race condition caused by late addBA resp

 net/mac80211/agg-tx.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-11-28 14:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27  7:23 [PATCH] mac80211: fix race condition caused by late addBA resp Nikolay Martynov
2011-11-27  7:23 ` Nikolay Martynov
2011-11-27  9:38   ` Johannes Berg
2011-11-27 10:42     ` Emmanuel Grumbach
2011-11-27 15:43     ` Nikolay Martynov
2011-11-27 11:50   ` [PATCH v2] mac80211: fix race condition caused by late addBA response Johannes Berg
2011-11-27 11:53     ` [PATCH v3] " Johannes Berg
2011-11-27 16:12       ` Nikolay Martynov
2011-11-27 16:55         ` Johannes Berg
2011-11-28  6:35           ` Emmanuel Grumbach
2011-11-28  8:16             ` Johannes Berg
2011-11-28 12:34               ` Emmanuel Grumbach
2011-11-28 13:18                 ` Johannes Berg
2011-11-28 14:21                   ` Nikolay Martynov
2011-11-28  8:18       ` [PATCH v4] " Johannes Berg

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).