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]
Message-ID: <Pine.LNX.4.64.0706130912080.4392@localhost.localdomain>
Date:	Wed, 13 Jun 2007 09:14:55 -0400 (EDT)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	psr <pradeep.rautela@...il.com>
cc:	Shani Moideen <shani.moideen@...ro.com>, netdev@...r.kernel.org,
	akpm@...ux-foundation.org, jgarzik@...ox.com,
	kernel-janitors@...ts.osdl.org
Subject: Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp)
 in net/core/pktgen.c

On Wed, 13 Jun 2007, psr wrote:

> On 6/13/07, Shani Moideen <shani.moideen@...ro.com> wrote:
> >
> > Replacing alloc_pages(gfp,0) with alloc_page(gfp)
> > in net/core/pktgen.c
> >
> > Signed-off-by: Shani Moideen <shani.moideen@...ro.com>
> > ----
> >
> > diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> > index b92a322..2600c7f 100644
> > --- a/net/core/pktgen.c
> > +++ b/net/core/pktgen.c
> > @@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct
> > net_device *odev,
> >
> >                 i = 0;
> >                 while (datalen > 0) {
> > -                       struct page *page = alloc_pages(GFP_KERNEL, 0);
> > +                       struct page *page = alloc_page(GFP_KERNEL);
>
> Does this makes any difference anyway? Both are same eventually?
> What is the rational behind this? Can you please help me
> understanding this?

since this is one of the TO DO items i added to the list of things at
the wiki:

http://fsdev.net/wiki/index.php?title=Memory_allocation_cleanup

i'll just toss in my $0.02.  if a short (more convenient) form of a
routine has been defined, it should be used.  if you have no plans to
use it, it shouldn't have been defined in the first place.

in short, make a consistent decision and go with it.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
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