wifi: ath11k: Fix qmi_msg_handler data structure initialization
authorRahul Bhattacharjee <quic_rbhattac@quicinc.com>
Fri, 21 Oct 2022 09:01:26 +0000 (14:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:33:00 +0000 (13:33 +0100)
commita10e1530c424bb277b4edc7def0195857a548495
tree26bb1b168a6cba516d36a47eb6f1fd39bf2750cc
parent15e6830642e6d71fe5850b83ec7a20699e960706
wifi: ath11k: Fix qmi_msg_handler data structure initialization

[ Upstream commit ed3725e15a154ebebf44e0c34806c57525483f92 ]

qmi_msg_handler is required to be null terminated by QMI module.
There might be a case where a handler for a msg id is not present in the
handlers array which can lead to infinite loop while searching the handler
and therefore out of bound access in qmi_invoke_handler().
Hence update the initialization in qmi_msg_handler data structure.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1

Signed-off-by: Rahul Bhattacharjee <quic_rbhattac@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20221021090126.28626-1-quic_rbhattac@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath11k/qmi.c