From ca24670e562f758758f5cec9bdd2628950a04b4c Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Wed, 27 May 2020 15:10:04 +0530 Subject: [PATCH] qcacmn: Crash if the tag length and filled data are not matching Whenever a wmi even it received the tlv received from the firmware will be sanitized, if there is any error the event would be dropped. This dropping of the event can give side effects in the host/firmware after some time and making it difficult to find the actual reason of why the tlv is not received properly. Crash the system if the tlv is not parsed correctly to debug the issues. Change-Id: Ic56e3f96252ac74917caeebc8296c2b50ae4f3cd CRs-Fixed: 2695053 --- wmi/src/wmi_unified.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index a3225a2547e3..3c65fab8f663 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -2415,9 +2415,8 @@ void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf) data, len, id, &wmi_cmd_struct_ptr); if (tlv_ok_status != 0) { - QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, - "%s: Error: id=0x%x, wmitlv check status=%d", - __func__, id, tlv_ok_status); + QDF_DEBUG_PANIC("%s: Error: id=0x%x, wmitlv check status=%d", + __func__, id, tlv_ok_status); goto end; } }