summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2017-12-18 20:13:07 +0200
committerLuca Coelho <luciano.coelho@intel.com>2018-03-28 12:16:04 +0300
commit9a233bb8025105db9a60b5d761005cc5a6c77f3d (patch)
treeed659e1be50cea9fbd5529127075b9032f219b7e /drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
parent759931c79fc3c8c4748269a5c2e7d48563baa6d5 (diff)
downloadlinux-9a233bb8025105db9a60b5d761005cc5a6c77f3d.tar.bz2
iwlwifi: mvm: check if mac80211_queue is valid in iwl_mvm_disable_txq
Sometimes iwl_mvm_disable_txq() may be called with mac80211_queue == IEEE80211_INVAL_HW_QUEUE, and this would cause us to use BIT(0xFF) which is way too large for the u16 we used to store it in hw_queue_to_mac820211. If this happens the following UBSAN warning will be generated: [ 167.185167] UBSAN: Undefined behaviour in drivers/net/wireless/intel/iwlwifi/mvm/utils.c:838:5 [ 167.185171] shift exponent 255 is too large for 64-bit type 'long unsigned int' Fix that by checking that it is not IEEE80211_INVAL_HW_QUEUE and, while at it, add a warning if the queue number is larger than IEEE80211_MAX_QUEUES. Fixes: 34e10860ae8d ("iwlwifi: mvm: remove references to queue_info in new TX path") Reported-by: Paul Menzel <pmenzel+linux-wireless@molgen.mpg.de> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/api/scan.h')
0 files changed, 0 insertions, 0 deletions