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
| ||
|
Date: Wed, 26 Sep 2012 09:11:10 -0400 From: Benjamin LaHaise <bcrl@...ck.org> To: Eric Dumazet <eric.dumazet@...il.com> 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 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, -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