]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: don't crash on invalid rate w/o STA
authorJohannes Berg <johannes.berg@intel.com>
Fri, 3 Dec 2021 12:04:24 +0000 (14:04 +0200)
committerKalle Valo <kvalo@kernel.org>
Wed, 8 Dec 2021 18:14:51 +0000 (20:14 +0200)
commita1a1814f4960495e41b677a8117bc1fb4f5e5ac3
tree34ba99349d5f56013c40bc7d6ddfd90899f9b9b9
parentfcd797d0c54d92b14c74f64551adb6795745e765
iwlwifi: mvm: don't crash on invalid rate w/o STA

If we get to the WARN_ONCE(..., "Got a HT rate (...)", ...)
here with a NULL sta, then we crash because mvmsta is bad
and we try to dereference it. Fix that by printing -1 as the
state if no station was given.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 5689637179ad ("iwlwifi: mvm: add explicit check for non-data frames in get Tx rate")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/iwlwifi.20211203140410.1a1541d7dcb5.I606c746e11447fe168cf046376b70b04e278c3b4@changeid
drivers/net/wireless/intel/iwlwifi/mvm/tx.c