]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Dec 2019 13:11:32 +0000 (14:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Dec 2019 13:11:32 +0000 (14:11 +0100)
added patches:
firmware-qcom-scm-ensure-a0-status-code-is-treated-as-signed.patch

queue-4.9/firmware-qcom-scm-ensure-a0-status-code-is-treated-as-signed.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/firmware-qcom-scm-ensure-a0-status-code-is-treated-as-signed.patch b/queue-4.9/firmware-qcom-scm-ensure-a0-status-code-is-treated-as-signed.patch
new file mode 100644 (file)
index 0000000..6e34b10
--- /dev/null
@@ -0,0 +1,34 @@
+From ff34f3cce278a0982a7b66b1afaed6295141b1fc Mon Sep 17 00:00:00 2001
+From: Will Deacon <will@kernel.org>
+Date: Mon, 4 Nov 2019 15:58:15 +0000
+Subject: firmware: qcom: scm: Ensure 'a0' status code is treated as signed
+
+From: Will Deacon <will@kernel.org>
+
+commit ff34f3cce278a0982a7b66b1afaed6295141b1fc upstream.
+
+The 'a0' member of 'struct arm_smccc_res' is declared as 'unsigned long',
+however the Qualcomm SCM firmware interface driver expects to receive
+negative error codes via this field, so ensure that it's cast to 'long'
+before comparing to see if it is less than 0.
+
+Cc: <stable@vger.kernel.org>
+Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/firmware/qcom_scm-64.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firmware/qcom_scm-64.c
++++ b/drivers/firmware/qcom_scm-64.c
+@@ -158,7 +158,7 @@ static int qcom_scm_call(struct device *
+               kfree(args_virt);
+       }
+-      if (res->a0 < 0)
++      if ((long)res->a0 < 0)
+               return qcom_scm_remap_error(res->a0);
+       return 0;
index d52e5b7aeda1fb2596ab213d0ede30743bd0ce98..0b7ecb376626fab7aaca51c4868dcddac55b0df8 100644 (file)
@@ -165,3 +165,4 @@ scsi-qla2xxx-fix-qla24xx_process_bidir_cmd.patch
 scsi-qla2xxx-always-check-the-qla2x00_wait_for_hba_o.patch
 powerpc-fix-vdso-clock_getres.patch
 reiserfs-fix-extended-attributes-on-the-root-directo.patch
+firmware-qcom-scm-ensure-a0-status-code-is-treated-as-signed.patch