]> git.karo-electronics.de Git - linux-beck.git/commit
iwlwifi: mvm: avoid crash on restart w/o reserved queues
authorJohannes Berg <johannes.berg@intel.com>
Fri, 2 Dec 2016 11:03:36 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 07:08:29 +0000 (08:08 +0100)
commit40add19d3897dda97086ec7a73cf4e8daf7c00ee
tree9de6b994c7375fab76632cdce8cfe8ccb3a76982
parent97663735a96f0cd7c851bbb8f08cff66d617220c
iwlwifi: mvm: avoid crash on restart w/o reserved queues

commit 03c902bff524e0cf664737a33f2365f7837040bf upstream.

When the firmware restarts in a situation in which any station
has no queue reserved anymore because that queue was used, the
code will crash trying to access the queue_info array at the
offset 255, which is far too big. Fix this by checking that a
queue is actually reserved before writing its status.

Fixes: 8d98ae6eb0d5 ("iwlwifi: mvm: re-assign old queues after hw restart in dqa mode")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c