Discussion:
Patch "spi: dw-mid: check that DMA was inited before exit" has been added to the 3.16-stable tree
g***@linuxfoundation.org
2014-10-23 06:47:16 UTC
Permalink
This is a note to let you know that I've just added the patch titled

spi: dw-mid: check that DMA was inited before exit

to the 3.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
spi-dw-mid-check-that-dma-was-inited-before-exit.patch
and it can be found in the queue-3.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
From fb57862ead652454ceeb659617404c5f13bc34b5 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <***@linux.intel.com>
Date: Fri, 12 Sep 2014 15:11:58 +0300
Subject: spi: dw-mid: check that DMA was inited before exit

From: Andy Shevchenko <***@linux.intel.com>

commit fb57862ead652454ceeb659617404c5f13bc34b5 upstream.

If the driver was compiled with DMA support, but DMA channels weren't acquired
by some reason, mid_spi_dma_exit() will crash the kernel.

Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support)
Signed-off-by: Andy Shevchenko <***@linux.intel.com>
Signed-off-by: Mark Brown <***@kernel.org>
Signed-off-by: Greg Kroah-Hartman <***@linuxfoundation.org>

---
drivers/spi/spi-dw-mid.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -89,6 +89,8 @@ err_exit:

static void mid_spi_dma_exit(struct dw_spi *dws)
{
+ if (!dws->dma_inited)
+ return;
dma_release_channel(dws->txchan);
dma_release_channel(dws->rxchan);
}


Patches currently in stable-queue which might be from ***@linux.intel.com are

queue-3.16/pci_ids-add-support-for-intel-quark-ilb.patch
queue-3.16/spi-dw-mid-check-that-dma-was-inited-before-exit.patch
queue-3.16/spi-dw-mid-respect-8-bit-mode.patch

Loading...