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:	Thu, 29 May 2008 23:21:02 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Rusty Russell <rusty@...tcorp.com.au>
cc:	akpm@...ux-foundation.org, linux-arch@...r.kernel.org,
	linux-kernel@...r.kernel.org, David Miller <davem@...emloft.net>,
	Eric Dumazet <dada1@...mosbay.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Mike Travis <travis@....com>
Subject: Re: [patch 03/41] cpu alloc: Use cpu allocator instead of the builtin
 modules per cpu allocator

On Fri, 30 May 2008, Rusty Russell wrote:

> Hmm, does cpu_free(NULL, 0) do something?  Seems like it shouldn't, for 
> symmetry with free().

No it just returns.

> > +		percpu = cpu_alloc(size, GFP_KERNEL|__GFP_ZERO, align);
> > +		if (!percpu)
> > +			printk(KERN_WARNING "Could not allocate %lu bytes percpu data\n",
> > +										size);
> >  		if (!percpu) {
> >  			err = -ENOMEM;
> >  			goto free_mod;
> 
> OK, we've *never* had a report of the per-cpu alignment message, so I'd be 
> happy to pass that through to cpu_alloc() and have it fail.  Also, the if 
> (!percpu) cases should be combined.

Ack.

> >   free_percpu:
> >  	if (percpu)
> > -		percpu_modfree(percpu);
> > +		cpu_free(percpu, percpu_size);
> 
> As above.

The if can be dropped.

> 
> > +	goal = __per_cpu_size;
> 
> Where did __per_cpu_size come from?  I missed it in the earlier patches...

Its __per_cpu_end - __per_cpu_start.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ