]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jan 2024 11:27:54 +0000 (12:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jan 2024 11:27:54 +0000 (12:27 +0100)
added patches:
bluetooth-smp-fix-crash-when-receiving-new-connection-when-debug-is-enabled.patch
spi-atmel-fix-pdc-transfer-setup-bug.patch

queue-5.10/bluetooth-smp-fix-crash-when-receiving-new-connection-when-debug-is-enabled.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/spi-atmel-fix-pdc-transfer-setup-bug.patch [new file with mode: 0644]

diff --git a/queue-5.10/bluetooth-smp-fix-crash-when-receiving-new-connection-when-debug-is-enabled.patch b/queue-5.10/bluetooth-smp-fix-crash-when-receiving-new-connection-when-debug-is-enabled.patch
new file mode 100644 (file)
index 0000000..53bb8cc
--- /dev/null
@@ -0,0 +1,50 @@
+From 995fca15b73ff8f92888cc2d5d95f17ffdac74ba Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Mon, 14 Jun 2021 10:46:44 -0700
+Subject: Bluetooth: SMP: Fix crash when receiving new connection when debug is enabled
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 995fca15b73ff8f92888cc2d5d95f17ffdac74ba upstream.
+
+When receiving a new connection pchan->conn won't be initialized so the
+code cannot use bt_dev_dbg as the pointer to hci_dev won't be
+accessible.
+
+Fixes: 2e1614f7d61e4 ("Bluetooth: SMP: Convert BT_ERR/BT_DBG to bt_dev_err/bt_dev_dbg")
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -3239,7 +3239,7 @@ static inline struct l2cap_chan *smp_new
+ {
+       struct l2cap_chan *chan;
+-      bt_dev_dbg(pchan->conn->hcon->hdev, "pchan %p", pchan);
++      BT_DBG("pchan %p", pchan);
+       chan = l2cap_chan_create();
+       if (!chan)
+@@ -3260,7 +3260,7 @@ static inline struct l2cap_chan *smp_new
+        */
+       atomic_set(&chan->nesting, L2CAP_NESTING_SMP);
+-      bt_dev_dbg(pchan->conn->hcon->hdev, "created chan %p", chan);
++      BT_DBG("created chan %p", chan);
+       return chan;
+ }
+@@ -3364,7 +3364,7 @@ static void smp_del_chan(struct l2cap_ch
+ {
+       struct smp_dev *smp;
+-      bt_dev_dbg(chan->conn->hcon->hdev, "chan %p", chan);
++      BT_DBG("chan %p", chan);
+       smp = chan->data;
+       if (smp) {
index 120da5f45df8ac26cbeba836cb01a95d2ecb8e4b..33437af13834ef01f65ca00a59497782d5d6b5be 100644 (file)
@@ -71,3 +71,5 @@ netfilter-nf_tables-skip-set-commit-for-deleted-destroyed-sets.patch
 dm-integrity-don-t-modify-bio-s-immutable-bio_vec-in-integrity_metadata.patch
 tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch
 revert-mips-loongson64-enable-dma-noncoherent-support.patch
+bluetooth-smp-fix-crash-when-receiving-new-connection-when-debug-is-enabled.patch
+spi-atmel-fix-pdc-transfer-setup-bug.patch
diff --git a/queue-5.10/spi-atmel-fix-pdc-transfer-setup-bug.patch b/queue-5.10/spi-atmel-fix-pdc-transfer-setup-bug.patch
new file mode 100644 (file)
index 0000000..0334e00
--- /dev/null
@@ -0,0 +1,45 @@
+From 75e33c55ae8fb4a177fe07c284665e1d61b02560 Mon Sep 17 00:00:00 2001
+From: Ville Baillie <villeb@bytesnap.co.uk>
+Date: Tue, 21 Sep 2021 07:21:32 +0000
+Subject: spi: atmel: Fix PDC transfer setup bug
+
+From: Ville Baillie <villeb@bytesnap.co.uk>
+
+commit 75e33c55ae8fb4a177fe07c284665e1d61b02560 upstream.
+
+atmel_spi_dma_map_xfer to never be called in PDC mode. This causes the
+driver to silently fail.
+
+This patch changes the conditional to match the behaviour of the
+previous commit before the refactor.
+
+Fixes: 5fa5e6dec762 ("spi: atmel: Switch to transfer_one transfer method")
+Signed-off-by: Ville Baillie <villeb@bytesnap.co.uk>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20210921072132.21831-1-villeb@bytesnap.co.uk
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/spi/spi-atmel.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/spi/spi-atmel.c
++++ b/drivers/spi/spi-atmel.c
+@@ -1315,7 +1315,7 @@ static int atmel_spi_one_transfer(struct
+        * DMA map early, for performance (empties dcache ASAP) and
+        * better fault reporting.
+        */
+-      if ((!master->cur_msg_mapped)
++      if ((!master->cur_msg->is_dma_mapped)
+               && as->use_pdc) {
+               if (atmel_spi_dma_map_xfer(as, xfer) < 0)
+                       return -ENOMEM;
+@@ -1394,7 +1394,7 @@ static int atmel_spi_one_transfer(struct
+               }
+       }
+-      if (!master->cur_msg_mapped
++      if (!master->cur_msg->is_dma_mapped
+               && as->use_pdc)
+               atmel_spi_dma_unmap_xfer(master, xfer);