]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Sep 2021 09:04:41 +0000 (11:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Sep 2021 09:04:41 +0000 (11:04 +0200)
added patches:
dmaengine-acpi-avoid-comparison-gsi-with-linux-virq.patch
staging-rtl8192u-fix-bitwise-vs-logical-operator-in-translaterxsignalstuff819xusb.patch
um-virtio_uml-fix-memory-leak-on-init-failures.patch

queue-5.4/dmaengine-acpi-avoid-comparison-gsi-with-linux-virq.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/staging-rtl8192u-fix-bitwise-vs-logical-operator-in-translaterxsignalstuff819xusb.patch [new file with mode: 0644]
queue-5.4/um-virtio_uml-fix-memory-leak-on-init-failures.patch [new file with mode: 0644]

diff --git a/queue-5.4/dmaengine-acpi-avoid-comparison-gsi-with-linux-virq.patch b/queue-5.4/dmaengine-acpi-avoid-comparison-gsi-with-linux-virq.patch
new file mode 100644 (file)
index 0000000..bebd222
--- /dev/null
@@ -0,0 +1,42 @@
+From 67db87dc8284070adb15b3c02c1c31d5cf51c5d6 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Fri, 30 Jul 2021 23:27:15 +0300
+Subject: dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit 67db87dc8284070adb15b3c02c1c31d5cf51c5d6 upstream.
+
+Currently the CRST parsing relies on the fact that on most of x86 devices
+the IRQ mapping is 1:1 with Linux vIRQ. However, it may be not true for
+some. Fix this by converting GSI to Linux vIRQ before checking it.
+
+Fixes: ee8209fd026b ("dma: acpi-dma: parse CSRT to extract additional resources")
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Link: https://lore.kernel.org/r/20210730202715.24375-1-andriy.shevchenko@linux.intel.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/acpi-dma.c |   10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/dma/acpi-dma.c
++++ b/drivers/dma/acpi-dma.c
+@@ -70,10 +70,14 @@ static int acpi_dma_parse_resource_group
+       si = (const struct acpi_csrt_shared_info *)&grp[1];
+-      /* Match device by MMIO and IRQ */
++      /* Match device by MMIO */
+       if (si->mmio_base_low != lower_32_bits(mem) ||
+-          si->mmio_base_high != upper_32_bits(mem) ||
+-          si->gsi_interrupt != irq)
++          si->mmio_base_high != upper_32_bits(mem))
++              return 0;
++
++      /* Match device by Linux vIRQ */
++      ret = acpi_register_gsi(NULL, si->gsi_interrupt, si->interrupt_mode, si->interrupt_polarity);
++      if (ret != irq)
+               return 0;
+       dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",
index 418969b91d734d0baa86e329bf6f2607083d1241..5439719286bae9f5a0b35f15190c29402eba3bc3 100644 (file)
@@ -14,3 +14,6 @@ arm-9079-1-ftrace-add-module_plts-support.patch
 arm-9098-1-ftrace-module_plt-fix-build-problem-without-dynamic_ftrace.patch
 sctp-validate-chunk-size-in-__rcv_asconf_lookup.patch
 sctp-add-param-size-validation-for-sctp_param_set_primary.patch
+staging-rtl8192u-fix-bitwise-vs-logical-operator-in-translaterxsignalstuff819xusb.patch
+um-virtio_uml-fix-memory-leak-on-init-failures.patch
+dmaengine-acpi-avoid-comparison-gsi-with-linux-virq.patch
diff --git a/queue-5.4/staging-rtl8192u-fix-bitwise-vs-logical-operator-in-translaterxsignalstuff819xusb.patch b/queue-5.4/staging-rtl8192u-fix-bitwise-vs-logical-operator-in-translaterxsignalstuff819xusb.patch
new file mode 100644 (file)
index 0000000..b3e77f3
--- /dev/null
@@ -0,0 +1,40 @@
+From 099ec97ac92911abfb102bb5c68ed270fc12e0dd Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Sat, 14 Aug 2021 16:56:26 -0700
+Subject: staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+commit 099ec97ac92911abfb102bb5c68ed270fc12e0dd upstream.
+
+clang warns:
+
+drivers/staging/rtl8192u/r8192U_core.c:4268:20: warning: bitwise and of
+boolean expressions; did you mean logical and? [-Wbool-operation-and]
+        bpacket_toself =  bpacket_match_bssid &
+                          ^~~~~~~~~~~~~~~~~~~~~
+                                              &&
+1 warning generated.
+
+Replace the bitwise AND with a logical one to clear up the warning, as
+that is clearly what was intended.
+
+Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging")
+Signed-off-by: Nathan Chancellor <nathan@kernel.org>
+Link: https://lore.kernel.org/r/20210814235625.1780033-1-nathan@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/rtl8192u/r8192U_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/rtl8192u/r8192U_core.c
++++ b/drivers/staging/rtl8192u/r8192U_core.c
+@@ -4338,7 +4338,7 @@ static void TranslateRxSignalStuff819xUs
+       bpacket_match_bssid = (type != IEEE80211_FTYPE_CTL) &&
+                              (ether_addr_equal(priv->ieee80211->current_network.bssid,  (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : hdr->addr3))
+                              && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV);
+-      bpacket_toself =  bpacket_match_bssid &
++      bpacket_toself =  bpacket_match_bssid &&
+                         (ether_addr_equal(praddr, priv->ieee80211->dev->dev_addr));
+       if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BEACON)
diff --git a/queue-5.4/um-virtio_uml-fix-memory-leak-on-init-failures.patch b/queue-5.4/um-virtio_uml-fix-memory-leak-on-init-failures.patch
new file mode 100644 (file)
index 0000000..de98838
--- /dev/null
@@ -0,0 +1,41 @@
+From 7ad28e0df7ee9dbcb793bb88dd81d4d22bb9a10e Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Fri, 25 Jun 2021 10:34:37 +0200
+Subject: um: virtio_uml: fix memory leak on init failures
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit 7ad28e0df7ee9dbcb793bb88dd81d4d22bb9a10e upstream.
+
+If initialization fails, e.g. because the connection failed,
+we leak the 'vu_dev'. Fix that. Reported by smatch.
+
+Fixes: 5d38f324993f ("um: drivers: Add virtio vhost-user driver")
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/um/drivers/virtio_uml.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/um/drivers/virtio_uml.c
++++ b/arch/um/drivers/virtio_uml.c
+@@ -994,7 +994,7 @@ static int virtio_uml_probe(struct platf
+               rc = os_connect_socket(pdata->socket_path);
+       } while (rc == -EINTR);
+       if (rc < 0)
+-              return rc;
++              goto error_free;
+       vu_dev->sock = rc;
+       rc = vhost_user_init(vu_dev);
+@@ -1010,6 +1010,8 @@ static int virtio_uml_probe(struct platf
+ error_init:
+       os_close_file(vu_dev->sock);
++error_free:
++      kfree(vu_dev);
+       return rc;
+ }