]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:25 +0000 (09:49 +0100)
commitb4effeba5c4e3fd01c177f306105510dc669209d
treed380642f7d51e9bb9d87a58a131a51ef33f25731
parent633c17faef6c7b0d5a937db317d39fa611da82f0
iwlwifi: mvm: don't crash on invalid rate w/o STA

BugLink: https://bugs.launchpad.net/bugs/1956302
[ Upstream commit d599f714b73e4177dfdfe64fce09175568288ee9 ]

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: 6761a718263a ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/net/wireless/intel/iwlwifi/mvm/tx.c