Commit 1729ceeb authored by Dan Carpenter's avatar Dan Carpenter Committed by Yongqin Liu
Browse files

UPSTREAM: soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()



commit 9f35ab0e upstream.

This function is supposed to return true for valid headers and false for
invalid.  In a couple places it returns -EINVAL instead which means the
invalid headers are counted as true.  Change it to return false.

Fixes: 9f9967fe ("soc: qcom: mdt_loader: Ensure we don't read past the ELF header")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/db57c01c-bdcc-4a0f-95db-b0f2784ea91f@sabinyo.mountain


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Cc: Yongqin Liu <yongqin.liu@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 146449535
Change-Id: I68ec1f452933cd4c4ba2cf7dfed7d6ab349bea2f
(cherry picked from commit 9ef594d1)
Signed-off-by: default avatarYongqin Liu <yongqin.liu@linaro.org>
parent 1257aa45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment