iwlwifi: fix possible data overwrite in hcmd callback
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 20 Apr 2011 14:02:58 +0000 (16:02 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Apr 2011 18:50:15 +0000 (14:50 -0400)
commit2624e96ce16bacae0e422d5775eac6d4fc33239a
tree7a1454ce758150d0e3fb83cff87cb0f184b8b42c
parent9f2e731d1d278d853def1567735d8a823668a3c8
iwlwifi: fix possible data overwrite in hcmd callback

My commit 3598e1774c94e55c71b585340e7dc4538f310e3f
"iwlwifi: fix enqueue hcmd race conditions" move hcmd callback after
command queue reclaim, to avoid call it with hcmd_lock. But since
queue read index was updated, cmd data can be overwritten. Fix problem
by calling callback before taking hcmd_lock and queue reclaim.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-tx.c