diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2012-05-30 12:27:11 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-06-11 16:13:41 +0300 |
commit | 0faf745872f6d00afb318185e8fb181587974b5a (patch) | |
tree | 004a1d372b01b330869b99591762674351302b30 /drivers/net/wireless/ath/ath6kl/core.h | |
parent | d154f32ebe3ffe9dea6ed0a91767883b1e7a6bc0 (diff) | |
download | op-kernel-dev-0faf745872f6d00afb318185e8fb181587974b5a.zip op-kernel-dev-0faf745872f6d00afb318185e8fb181587974b5a.tar.gz |
ath6kl: Fix race in aggregation reorder logic
There are many places where tid data are accessed without
the lock (rxtid->lock), this can lead to a race condition
when the timeout handler for aggregatin reorder and the
receive function are getting executed at the same time.
Fix this race, but still there are races which can not
be fixed without rewriting the whole aggregation reorder
logic, for now fix the obvious ones.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/core.h')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 17a44fa..12441f7 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -273,9 +273,15 @@ struct rxtid { struct sk_buff_head q; /* - * FIXME: No clue what this should protect. Apparently it should - * protect some of the fields above but they are also accessed - * without taking the lock. + * lock mainly protects seq_next and hold_q. Movement of seq_next + * needs to be protected between aggr_timeout() and + * aggr_process_recv_frm(). hold_q will be holding the pending + * reorder frames and it's access should also be protected. + * Some of the other fields like hold_q_sz, win_sz and aggr are + * initialized/reset when receiving addba/delba req, also while + * deleting aggr state all the pending buffers are flushed before + * resetting these fields, so there should not be any race in accessing + * these fields. */ spinlock_t lock; }; |