Skip to content
Commit f022d8cb authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Marek Szyprowski
Browse files

mm: cma: Don't crash on allocation if CMA area can't be activated



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.

Cc: <stable@vger.kernel.org>  # v3.17
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
parent cac7f242
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment