iwlwifi: pcie: validate queue ID before array deref/bit ops
authorJohannes Berg <johannes.berg@intel.com>
Tue, 8 Oct 2019 14:03:15 +0000 (16:03 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 23 Dec 2019 09:54:31 +0000 (11:54 +0200)
commit0e00270863daaf803b32c0ff64b73dabdefd612a
treee9c16b7bb4719b0026e14c7f24e68eb9757770a3
parentcfdc20efebdc1dc918338818b10f1d95b58b2ca5
iwlwifi: pcie: validate queue ID before array deref/bit ops

Validate that the queue ID is in range before trying to use it as
an index or for test_bit() - the previous bug showed that this has
in fact happened, and it was lucky that we caught it there, had the
bit been set then we'd have actually used the value despite being
far out of range.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c