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:	Wed, 26 Sep 2012 15:57:31 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Benjamin LaHaise <bcrl@...ck.org>
Cc:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Alexander Duyck <alexander.h.duyck@...el.com>
Subject: Re: [PATCH net-next] net: use bigger pages in __netdev_alloc_frag

On Wed, 2012-09-26 at 09:11 -0400, Benjamin LaHaise wrote:
> Hello Eric,
> 
> On Wed, Sep 26, 2012 at 11:06:42AM +0200, Eric Dumazet wrote:
> > +	int order;
> ...
> > +		for (order = NETDEV_FRAG_PAGE_MAX_ORDER; ;) {
> > +			gfp_t gfp = gfp_mask;
> > +
> > +			if (order)
> > +				gfp |= __GFP_COMP | __GFP_NOWARN;
> > +			nc->frag.page = alloc_pages(gfp, order);
> > +			if (likely(nc->frag.page))
> > +				break;
> > +			if (--order <= 0)
> > +				goto end;
> > +		}
> 
> I think you probably intended the last if to be "if (--order < 0)", as 
> otherwise the alloc will never be attempted with an order 0 page, which 
> could harm systems suffering from extreme memory fragmentation.  Cheers,
> 

Indeed, thanks Ben !


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ