Commit 8788f609 authored by Alex Elder's avatar Alex Elder Committed by Zheng Zengkai
Browse files

net: ipa: terminate message handler arrays



stable inclusion
from stable-5.10.27
commit 6d3635ed12e780375857cbd80d2b46229443c669
bugzilla: 51493

--------------------------------

[ Upstream commit 3a9ef3e1 ]

When a QMI handle is initialized, an array of message handler
structures is provided, defining how any received message should
be handled based on its type and message ID.  The QMI core code
traverses this array when a message arrives and calls the function
associated with the (type, msg_id) found in the array.

The array is supposed to be terminated with an empty (all zero)
entry though.  Without it, an unsupported message will cause
the QMI core code to go past the end of the array.

Fix this bug, by properly terminating the message handler arrays
provided when QMI handles are set up by the IPA driver.

Fixes: 530f9216 ("soc: qcom: ipa: AP/modem communications")
Reported-by: default avatarSujit Kautkar <sujitka@chromium.org>
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c0cd5ddb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment