This is a note to let you know that I've just added the patch titled
DMA: PL330: Check the pointer returned by kzalloc
to the 3.4-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:
dma-pl330-check-the-pointer-returned-by-kzalloc.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 61c6e7531d3b66b33187b8cdd700fd8ab93ffd62 Mon Sep 17 00:00:00 2001
From: Sachin Kamat <[email protected]>
Date: Mon, 17 Sep 2012 15:20:23 +0530
Subject: DMA: PL330: Check the pointer returned by kzalloc
From: Sachin Kamat <[email protected]>
commit 61c6e7531d3b66b33187b8cdd700fd8ab93ffd62 upstream.
kzalloc could return NULL. Hence add a check to avoid
NULL pointer dereference.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Jassi Brar <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/dma/pl330.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2937,6 +2937,11 @@ pl330_probe(struct amba_device *adev, co
num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan);
pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL);
+ if (!pdmac->peripherals) {
+ ret = -ENOMEM;
+ dev_err(&adev->dev, "unable to allocate pdmac->peripherals\n");
+ goto probe_err5;
+ }
for (i = 0; i < num_chan; i++) {
pch = &pdmac->peripherals[i];
Patches currently in stable-queue which might be from [email protected]
are
queue-3.4/dma-pl330-fix-potential-null-pointer-dereference-in.patch
queue-3.4/dma-pl330-check-the-pointer-returned-by-kzalloc.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html