Hello, On Friday 24 October 2014 11:50:14 Joonsoo Kim wrote: > On Fri, Oct 24, 2014 at 10:02:49AM +0800, Weijie Yang wrote: > > On Fri, Oct 24, 2014 at 7:42 AM, Laurent Pinchart wrote: > > > On Thursday 23 October 2014 18:53:36 Michal Nazarewicz wrote: > > >> On Thu, Oct 23 2014, Laurent Pinchart wrote: > > >> > 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 failing allocation if the area hasn't been successfully > > >> > actived, and detect that condition by moving the CMA bitmap > > >> > allocation after page block reservation completion. > > >> > > > >> > Signed-off-by: Laurent Pinchart > > >> > <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx> > > >> > > >> Cc: <stable@xxxxxxxxxxxxxxx> # v3.17 > > >> Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx> > > > > This patch is good, but how about add a active field in cma struct? > > use cma->active to check whether cma is actived successfully. > > I think it will make code more clear and readable. > > Just my little opinion. > > Or just setting cma->count to 0 would work fine. I would prefer setting cma->count to 0 to avoid the extra field. I'll modify the patch accordingly. -- Regards, Laurent Pinchart -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>