From d4fd747d3fcb8f1e71fe50ac075dc2a14e419628 Mon Sep 17 00:00:00 2001 From: Rahul Bhattacharjee Date: Thu, 30 Jun 2022 11:59:04 +0530 Subject: [PATCH] ath11k: Fix qmi_msg_handler data structure initialization 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. Signed-off-by: Rahul Bhattacharjee --- drivers/net/wireless/ath/ath11k/qmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index 524b4b0..f6b7579 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -4464,7 +4464,8 @@ static const struct qmi_msg_handler ath11k_qmi_msg_handlers[] = { sizeof(struct qmi_wlanfw_qdss_trace_save_ind_msg_v01), .fn = ath11k_wlfw_qdss_trace_save_ind_cb, }, - + /* (Additions here) */ + { /* terminator entry */ } }; static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl, -- 2.35.1