]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: fix potential NULL-dereference in iwl_mvm_reorder()
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 16 May 2016 11:34:20 +0000 (14:34 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 10 Jun 2016 10:34:34 +0000 (13:34 +0300)
commitafa05a1dccb48cfc6c14c43f1e83dcd2bc0d1bbb
tree88b3a33d00e742107de22b933d62cb7caac01169
parente7e4b5b66acb4230d769299be2641142c47c45e6
iwlwifi: mvm: fix potential NULL-dereference in iwl_mvm_reorder()

We try to access sta before we check for IS_ERR_OR_NULL(), so we may
end up accessing a NULL pointer.  To prevent that, move the conversion
from sta to mvm_sta below the check.

Fixes: 543502cec830 ("iwlwifi: mvm: add reorder buffer per queue")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c