iwlwifi: mvm: validate firmware sync response size
authorJohannes Berg <johannes.berg@intel.com>
Wed, 9 Dec 2020 21:16:40 +0000 (23:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Dec 2020 22:16:02 +0000 (00:16 +0200)
commitb570e5b0592a56c5990ae3aa0fdb93dd9b545d43
treeda1cd12bab4d09162171e59cd92d444c20b4f471
parente4475583b5c49d5a90dcff9ae201018cd98c7d84
iwlwifi: mvm: validate firmware sync response size

We send some data to the firmware and expect to get it back,
but we shouldn't really trust the firmware on this. Check the
size of all the data we send down to avoid using bad or just
uninitialized data when the firmware doesn't respond right.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a5a8173f16c7.I4fa68bb2b1c7dcc52ddd381c4042722d27c4a34d@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c