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:	Mon, 8 Dec 2014 17:51:15 +0800
From:	"Wang, Yalin" <Yalin.Wang@...ymobile.com>
To:	'Hillf Danton' <hillf.zj@...baba-inc.com>
CC:	linux-kernel <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: RE: [PATCH] mm:add VM_BUG_ON() for page_mapcount()

> -----Original Message-----
> From: Hillf Danton [mailto:hillf.zj@...baba-inc.com]
> Sent: Monday, December 08, 2014 5:33 PM
> To: Wang, Yalin
> Cc: linux-kernel; linux-mm@...ck.org; linux-arm-kernel@...ts.infradead.org;
> Andrew Morton; Hillf Danton
> Subject: Re: [PATCH] mm:add VM_BUG_ON() for page_mapcount()
> 
> >
> > This patch add VM_BUG_ON() for slab page, because _mapcount is an
> > union with slab struct in struct page, avoid access _mapcount if this
> > page is a slab page.
> > Also remove the unneeded bracket.
> >
> > Signed-off-by: Yalin Wang <yalin.wang@...ymobile.com>
> > ---
> >  include/linux/mm.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/mm.h b/include/linux/mm.h index
> > 11b65cf..34124c4 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -373,7 +373,8 @@ static inline void reset_page_mapcount(struct page
> > *page)
> >
> >  static inline int page_mapcount(struct page *page)  {
> > -	return atomic_read(&(page)->_mapcount) + 1;
> > +	VM_BUG_ON(PageSlab(page));
> 
> s/ VM_BUG_ON/ VM_BUG_ON_PAGE/ ?
Yes, I will send again .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ