]> git.baikalelectronics.ru Git - kernel.git/commit
soc: qcom: qmi_interface: Limit txn ids to U16_MAX
authorArun Kumar Neelakantam <aneela@codeaurora.org>
Wed, 3 Oct 2018 05:40:02 +0000 (11:10 +0530)
committerAndy Gross <andy.gross@linaro.org>
Wed, 14 Nov 2018 18:02:07 +0000 (10:02 -0800)
commit8e2fbbef346b1384499b76de34263cd6ca1f18d3
tree0f0eea974b98395a412c3ab1a682e2127970e4c9
parentfa868c22040c84aceecf8b1bca9afbb073120116
soc: qcom: qmi_interface: Limit txn ids to U16_MAX

Txn IDs created up to INT_MAX cause overflow while storing
the IDs in u16 type supported by QMI header.

Limit the txn IDs max value to U16_MAX to avoid overflow.

Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/qmi_interface.c
include/linux/soc/qcom/qmi.h