]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 14:32:53 +0000 (16:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 14:32:53 +0000 (16:32 +0200)
added patches:
misc-alcor_pci-fix-inverted-branch-condition.patch
scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch

queue-5.10/misc-alcor_pci-fix-inverted-branch-condition.patch [new file with mode: 0644]
queue-5.10/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/misc-alcor_pci-fix-inverted-branch-condition.patch b/queue-5.10/misc-alcor_pci-fix-inverted-branch-condition.patch
new file mode 100644 (file)
index 0000000..68a59ba
--- /dev/null
@@ -0,0 +1,34 @@
+From 281e468446994a7672733af2bf941f4110d4a895 Mon Sep 17 00:00:00 2001
+From: Tong Zhang <ztong0001@gmail.com>
+Date: Sat, 22 May 2021 00:37:25 -0400
+Subject: misc: alcor_pci: fix inverted branch condition
+
+From: Tong Zhang <ztong0001@gmail.com>
+
+commit 281e468446994a7672733af2bf941f4110d4a895 upstream.
+
+This patch fixes a trivial mistake that I made in the previous attempt
+in fixing the null bridge issue. The branch condition is inverted and we
+should call alcor_pci_find_cap_offset() only if bridge is not null.
+
+Reported-by: Colin Ian King <colin.king@canonical.com>
+Fixes: 3ce3e45cc333 ("misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge")
+Signed-off-by: Tong Zhang <ztong0001@gmail.com>
+Link: https://lore.kernel.org/r/20210522043725.602179-1-ztong0001@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/cardreader/alcor_pci.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/misc/cardreader/alcor_pci.c
++++ b/drivers/misc/cardreader/alcor_pci.c
+@@ -144,7 +144,7 @@ static void alcor_pci_init_check_aspm(st
+        * priv->parent_pdev will be NULL. In this case we don't check its
+        * capability and disable ASPM completely.
+        */
+-      if (!priv->parent_pdev)
++      if (priv->parent_pdev)
+               priv->parent_cap_off = alcor_pci_find_cap_offset(priv,
+                                                        priv->parent_pdev);
diff --git a/queue-5.10/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch b/queue-5.10/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch
new file mode 100644 (file)
index 0000000..908b3ed
--- /dev/null
@@ -0,0 +1,33 @@
+From 80927822e8b6be46f488524cd7d5fe683de97fc4 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 3 Jun 2021 15:33:20 +0300
+Subject: scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 80927822e8b6be46f488524cd7d5fe683de97fc4 upstream.
+
+The "retval" variable needs to be signed for the error handling to work.
+
+Link: https://lore.kernel.org/r/YLjMEAFNxOas1mIp@mwanda
+Fixes: 7e26e3ea0287 ("scsi: scsi_dh_alua: Check for negative result value")
+Reviewed-by: Martin Wilck <mwilck@suse.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/device_handler/scsi_dh_alua.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/scsi/device_handler/scsi_dh_alua.c
++++ b/drivers/scsi/device_handler/scsi_dh_alua.c
+@@ -508,7 +508,8 @@ static int alua_rtpg(struct scsi_device
+       struct alua_port_group *tmp_pg;
+       int len, k, off, bufflen = ALUA_RTPG_SIZE;
+       unsigned char *desc, *buff;
+-      unsigned err, retval;
++      unsigned err;
++      int retval;
+       unsigned int tpg_desc_tbl_off;
+       unsigned char orig_transition_tmo;
+       unsigned long flags;
index ebe3c450287401dc97791a163e9cacf874790e28..1ab37360272fc5da93132c9c1dd42fd9a8167f8c 100644 (file)
@@ -153,6 +153,7 @@ pci-sysfs-fix-dsm_label_utf16s_to_utf8s-buffer-overr.patch
 power-supply-rt5033_battery-fix-device-tree-enumerat.patch
 nfsv4-initialise-connection-to-the-server-in-nfs4_al.patch
 nfsv4-fix-an-oops-in-pnfs_mark_request_commit-when-d.patch
+misc-alcor_pci-fix-inverted-branch-condition.patch
 um-fix-stack-pointer-alignment.patch
 um-fix-error-return-code-in-slip_open.patch
 um-fix-error-return-code-in-winch_tramp.patch
@@ -240,3 +241,4 @@ mips-always-link-byteswap-helpers-into-decompressor.patch
 mips-disable-branch-profiling-in-boot-decompress.o.patch
 perf-report-fix-task-and-stat-with-pipe-input.patch
 mips-vdso-invalid-gic-access-through-vdso.patch
+scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch