]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2022 10:32:26 +0000 (12:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2022 10:32:26 +0000 (12:32 +0200)
added patches:
bluetooth-l2cap-fix-build-errors-in-some-archs.patch

queue-5.19/bluetooth-l2cap-fix-build-errors-in-some-archs.patch [new file with mode: 0644]
queue-5.19/series

diff --git a/queue-5.19/bluetooth-l2cap-fix-build-errors-in-some-archs.patch b/queue-5.19/bluetooth-l2cap-fix-build-errors-in-some-archs.patch
new file mode 100644 (file)
index 0000000..0051f2c
--- /dev/null
@@ -0,0 +1,63 @@
+From b840304fb46cdf7012722f456bce06f151b3e81b Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 12 Aug 2022 15:33:57 -0700
+Subject: Bluetooth: L2CAP: Fix build errors in some archs
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit b840304fb46cdf7012722f456bce06f151b3e81b upstream.
+
+This attempts to fix the follow errors:
+
+In function 'memcmp',
+    inlined from 'bacmp' at ./include/net/bluetooth/bluetooth.h:347:9,
+    inlined from 'l2cap_global_chan_by_psm' at
+    net/bluetooth/l2cap_core.c:2003:15:
+./include/linux/fortify-string.h:44:33: error: '__builtin_memcmp'
+specified bound 6 exceeds source size 0 [-Werror=stringop-overread]
+   44 | #define __underlying_memcmp     __builtin_memcmp
+      |                                 ^
+./include/linux/fortify-string.h:420:16: note: in expansion of macro
+'__underlying_memcmp'
+  420 |         return __underlying_memcmp(p, q, size);
+      |                ^~~~~~~~~~~~~~~~~~~
+In function 'memcmp',
+    inlined from 'bacmp' at ./include/net/bluetooth/bluetooth.h:347:9,
+    inlined from 'l2cap_global_chan_by_psm' at
+    net/bluetooth/l2cap_core.c:2004:15:
+./include/linux/fortify-string.h:44:33: error: '__builtin_memcmp'
+specified bound 6 exceeds source size 0 [-Werror=stringop-overread]
+   44 | #define __underlying_memcmp     __builtin_memcmp
+      |                                 ^
+./include/linux/fortify-string.h:420:16: note: in expansion of macro
+'__underlying_memcmp'
+  420 |         return __underlying_memcmp(p, q, size);
+      |                ^~~~~~~~~~~~~~~~~~~
+
+Fixes: 332f1795ca20 ("Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm regression")
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/l2cap_core.c |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/net/bluetooth/l2cap_core.c
++++ b/net/bluetooth/l2cap_core.c
+@@ -1991,11 +1991,11 @@ static struct l2cap_chan *l2cap_global_c
+                       src_match = !bacmp(&c->src, src);
+                       dst_match = !bacmp(&c->dst, dst);
+                       if (src_match && dst_match) {
+-                              c = l2cap_chan_hold_unless_zero(c);
+-                              if (c) {
+-                                      read_unlock(&chan_list_lock);
+-                                      return c;
+-                              }
++                              if (!l2cap_chan_hold_unless_zero(c))
++                                      continue;
++
++                              read_unlock(&chan_list_lock);
++                              return c;
+                       }
+                       /* Closest match */
index d4b7649556ad1b44a884535be0c93fd311407fa6..7f2e3cb206e453f6698b143fb02d12168a17b92a 100644 (file)
@@ -4,3 +4,4 @@ firmware-tegra-bpmp-do-only-aligned-access-to-ipc-memory-area.patch
 crypto-lib-remove-unneeded-selection-of-xor_blocks.patch
 docs-kerneldoc-preamble-test-xecjk.sty-before-loading.patch
 arm64-errata-add-cortex-a510-to-the-repeat-tlbi-list.patch
+bluetooth-l2cap-fix-build-errors-in-some-archs.patch