]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jun 2021 10:59:42 +0000 (12:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jun 2021 10:59:42 +0000 (12:59 +0200)
added patches:
dmaengine-pl330-fix-wrong-usage-of-spinlock-flags-in-dma_cyclc.patch

queue-4.9/dmaengine-pl330-fix-wrong-usage-of-spinlock-flags-in-dma_cyclc.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/dmaengine-pl330-fix-wrong-usage-of-spinlock-flags-in-dma_cyclc.patch b/queue-4.9/dmaengine-pl330-fix-wrong-usage-of-spinlock-flags-in-dma_cyclc.patch
new file mode 100644 (file)
index 0000000..5733a9b
--- /dev/null
@@ -0,0 +1,52 @@
+From 4ad5dd2d7876d79507a20f026507d1a93b8fff10 Mon Sep 17 00:00:00 2001
+From: Bumyong Lee <bumyong.lee@samsung.com>
+Date: Fri, 7 May 2021 15:36:47 +0900
+Subject: dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc
+
+From: Bumyong Lee <bumyong.lee@samsung.com>
+
+commit 4ad5dd2d7876d79507a20f026507d1a93b8fff10 upstream.
+
+flags varible which is the input parameter of pl330_prep_dma_cyclic()
+should not be used by spinlock_irq[save/restore] function.
+
+Signed-off-by: Jongho Park <jongho7.park@samsung.com>
+Signed-off-by: Bumyong Lee <bumyong.lee@samsung.com>
+Signed-off-by: Chanho Park <chanho61.park@samsung.com>
+Link: https://lore.kernel.org/r/20210507063647.111209-1-chanho61.park@samsung.com
+Fixes: f6f2421c0a1c ("dmaengine: pl330: Merge dma_pl330_dmac and pl330_dmac structs")
+Cc: stable@vger.kernel.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/pl330.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/dma/pl330.c
++++ b/drivers/dma/pl330.c
+@@ -2579,13 +2579,15 @@ static struct dma_async_tx_descriptor *p
+       for (i = 0; i < len / period_len; i++) {
+               desc = pl330_get_desc(pch);
+               if (!desc) {
++                      unsigned long iflags;
++
+                       dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n",
+                               __func__, __LINE__);
+                       if (!first)
+                               return NULL;
+-                      spin_lock_irqsave(&pl330->pool_lock, flags);
++                      spin_lock_irqsave(&pl330->pool_lock, iflags);
+                       while (!list_empty(&first->node)) {
+                               desc = list_entry(first->node.next,
+@@ -2595,7 +2597,7 @@ static struct dma_async_tx_descriptor *p
+                       list_move_tail(&first->node, &pl330->desc_pool);
+-                      spin_unlock_irqrestore(&pl330->pool_lock, flags);
++                      spin_unlock_irqrestore(&pl330->pool_lock, iflags);
+                       return NULL;
+               }
index d8b8431c1ea8cdb809157faa49639c3c3ed50227..617407017b94d9094296ae84391c0d91ab9dba02 100644 (file)
@@ -40,3 +40,4 @@ tracing-do-no-increment-trace_clock_global-by-one.patch
 pci-mark-ti-c667x-to-avoid-bus-reset.patch
 pci-mark-some-nvidia-gpus-to-avoid-bus-reset.patch
 arcv2-save-abi-registers-across-signal-handling.patch
+dmaengine-pl330-fix-wrong-usage-of-spinlock-flags-in-dma_cyclc.patch