diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-08-05 16:14:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-20 11:15:32 -0700 |
commit | c538f403b2d48ce41cfab3d087f6bebeaf9284ab (patch) | |
tree | e58270ccb4e999582647e64ef80fdc2f10baab8a /arch/um/os-Linux/helper.c | |
parent | fb9a5db0a2b7f04fe24dfa257526e6191a21372a (diff) | |
download | lwn-c538f403b2d48ce41cfab3d087f6bebeaf9284ab.tar.gz lwn-c538f403b2d48ce41cfab3d087f6bebeaf9284ab.zip |
uml: fix build when SLOB is enabled
commit 43f5b3085fdd27c4edf535d938b2cb0ccead4f75 upstream
Reintroduce uml_kmalloc for the benefit of UML libc code. The
previous tactic of declaring __kmalloc so it could be called directly
from the libc side of the house turned out to be getting too intimate
with slab, and it doesn't work with slob.
So, the uml_kmalloc wrapper is back. It calls kmalloc or whatever
that translates into, and libc code calls it.
kfree is left alone since that still works, leaving a somewhat
inconsistent API.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/um/os-Linux/helper.c')
-rw-r--r-- | arch/um/os-Linux/helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index f4bd349d4412..679accea2232 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c @@ -70,8 +70,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) data.pre_data = pre_data; data.argv = argv; data.fd = fds[1]; - data.buf = __cant_sleep() ? kmalloc(PATH_MAX, UM_GFP_ATOMIC) : - kmalloc(PATH_MAX, UM_GFP_KERNEL); + data.buf = __cant_sleep() ? uml_kmalloc(PATH_MAX, UM_GFP_ATOMIC) : + uml_kmalloc(PATH_MAX, UM_GFP_KERNEL); pid = clone(helper_child, (void *) sp, CLONE_VM, &data); if (pid < 0) { ret = -errno; |