lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Oct 2014 11:50:14 +0900
From:	Joonsoo Kim <iamjoonsoo.kim@....com>
To:	Weijie Yang <weijie.yang.kh@...il.com>
Cc:	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-sh@...r.kernel.org,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>
Subject: Re: [PATCH 1/4] mm: cma: Don't crash on allocation if CMA area can't
 be activated

On Fri, Oct 24, 2014 at 10:02:49AM +0800, Weijie Yang wrote:
> On Fri, Oct 24, 2014 at 7:42 AM, Laurent Pinchart
> <laurent.pinchart@...asonboard.com> wrote:
> > Hi Michal,
> >
> > 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@...asonboard.com>
> >>
> >> Cc: <stable@...r.kernel.org>  # v3.17
> >> Acked-by: Michal Nazarewicz <mina86@...a86.com>
> 
> 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.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists