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: <200811180854.52492.rusty@rustcorp.com.au>
Date:	Tue, 18 Nov 2008 08:54:52 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Jörn Engel <joern@...fs.org>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH 3/7] Improve alloc_percpu: expose percpu_modalloc and percpu_modfree

On Tuesday 18 November 2008 00:17:13 Jörn Engel wrote:
> On Mon, 17 November 2008 13:28:32 +0000, Rusty Russell wrote:
> > +static inline void *percpu_modalloc(unsigned long size, unsigned long align)
> > +{
> > +	return kzalloc(size);
> > +}
>
> You didn't test the patches much, did you? :)

No, not UP :)  I'd spent over four hours on them, so I figured it was time to
post them and get some concrete discussion.

Compiled and tested now, thanks!
Rusty.

cpualloc: Fixes for CONFIG_SMP=n

Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

diff -r 275b441d957b include/linux/percpu.h
--- a/include/linux/percpu.h	Mon Nov 17 23:42:27 2008 +1030
+++ b/include/linux/percpu.h	Tue Nov 18 08:52:05 2008 +1030
@@ -79,12 +79,16 @@
 #else
 static inline void *__alloc_percpu(unsigned long size, unsigned long align)
 {
-	return kzalloc(size);
+	return kzalloc(size, GFP_KERNEL);
 }
 
 static inline void free_percpu(void *pcpuptr)
 {
 	kfree(pcpuptr);
+}
+
+static inline void percpu_alloc_init(void)
+{
 }
 #endif /* CONFIG_SMP */
 

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