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

    media: exynos4-is: Free FIMC-IS CPU memory only when allocated

to the 3.15-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:
     media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch
and it can be found in the queue-3.15 subdirectory.

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


>From 404a90abc60f60df2757cb272660e003d326881f Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <[email protected]>
Date: Thu, 8 May 2014 14:35:15 -0300
Subject: media: exynos4-is: Free FIMC-IS CPU memory only when allocated

From: Sylwester Nawrocki <[email protected]>

commit 404a90abc60f60df2757cb272660e003d326881f upstream.

Ensure dma_free_coherent() is not called with incorrect arguments
and only when the memory was actually allocated. This will prevent
possible crashes on error paths of the top level media device driver,
when fimc-is device gets unregistered and its driver detached.

Signed-off-by: Sylwester Nawrocki <[email protected]>
Acked-by: Kyungmin Park <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/media/platform/exynos4-is/fimc-is.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -367,6 +367,9 @@ static void fimc_is_free_cpu_memory(stru
 {
        struct device *dev = &is->pdev->dev;
 
+       if (is->memory.vaddr == NULL)
+               return;
+
        dma_free_coherent(dev, is->memory.size, is->memory.vaddr,
                          is->memory.paddr);
 }


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

queue-3.15/media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch
queue-3.15/media-exynos4-is-fix-compilation-for-config_common_clk.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

Reply via email to