Skip to contentSkip to conversation

Patch "mmc: atmel-mci: Check pdata for NULL before dereferencing it at DMA config" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2016

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mmc: atmel-mci: Check pdata for NULL before dereferencing it at DMA config

to the 4.5-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:
mmc-atmel-mci-check-pdata-for-null-before-dereferencing-it-at-dma-config.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 93c77d2999b09f2084b033ea6489915e0104ad9c Mon Sep 17 00:00:00 2001

From: Brent Taylor <[email protected]>
Date: Sun, 13 Mar 2016 00:25:31 -0600
Subject: mmc: atmel-mci: Check pdata for NULL before dereferencing it at DMA config

From: Brent Taylor <[email protected]>

commit 93c77d2999b09f2084b033ea6489915e0104ad9c upstream.

Using an at91sam9g20ek development board with DTS configuration may trigger a kernel panic because of a NULL pointer dereference exception, while configuring DMA. Let's fix this by adding a check for pdata before dereferencing it.

---
 drivers/mmc/host/atmel-mci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/atmel-mci.c +1 -1
@@ -2443,7 +2443,7 @@ static int atmci_configure_dma(struct at
 		struct mci_platform_data *pdata = host->pdev->dev.platform_data;
 		dma_cap_mask_t mask;
 
-		if (!pdata->dma_filter)
+		if (!pdata || !pdata->dma_filter)
 			return -ENODEV;
 
 		dma_cap_zero(mask);

Patches currently in stable-queue which might be from [email protected] are

queue-4.5/mmc-atmel-mci-check-pdata-for-null-before-dereferencing-it-at-dma-config.patch