This is a note to let you know that I've just added the patch titled mm: cma: Don't crash on allocation if CMA area can't be activated to the 3.17-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: mm-cma-don-t-crash-on-allocation-if-cma-area-can-t-be-activated.patch and it can be found in the queue-3.17 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f022d8cb7ec70fe8edd56383d876001317ee76b1 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx> Date: Fri, 24 Oct 2014 13:18:39 +0300 Subject: mm: cma: Don't crash on allocation if CMA area can't be activated From: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx> commit f022d8cb7ec70fe8edd56383d876001317ee76b1 upstream. If activation of the CMA area fails its mutex won't be initialized, leading to an oops at allocation time when trying to lock the mutex. Fix this by setting the cma area count field to 0 when activation fails, leading to allocation returning NULL immediately. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx> Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- mm/cma.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/cma.c +++ b/mm/cma.c @@ -123,6 +123,7 @@ static int __init cma_activate_area(stru err: kfree(cma->bitmap); + cma->count = 0; return -EINVAL; } Patches currently in stable-queue which might be from laurent.pinchart+renesas@xxxxxxxxxxxxxxxx are queue-3.17/mm-cma-don-t-crash-on-allocation-if-cma-area-can-t-be-activated.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html