iwlwifi: pcie: don't crash on invalid RX interrupt
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Mar 2019 09:31:11 +0000 (10:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:48:15 +0000 (06:48 -0700)
commitaf73fb33aed1b4b57ac79b853eef9c2a820cf0f6
tree548e3df8396dafe585e20eb30b5686057c947284
parent9375939fea96f10e51a2050cd39dc3078de1b156
iwlwifi: pcie: don't crash on invalid RX interrupt

[ Upstream commit 30f24eabab8cd801064c5c37589d803cb4341929 ]

If for some reason the device gives us an RX interrupt before we're
ready for it, perhaps during device power-on with misconfigured IRQ
causes mapping or so, we can crash trying to access the queues.

Prevent that by checking that we actually have RXQs and that they
were properly allocated.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c