aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/helper.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-05-12 17:01:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-13 11:02:22 -0400
commit43f5b3085fdd27c4edf535d938b2cb0ccead4f75 (patch)
tree63eabda9f505ed0a07e0a12fd828674cde8f7861 /arch/um/os-Linux/helper.c
parent484f1e2c1ea58c6a4352313f7ee4edd4b52deecd (diff)
uml: fix build when SLOB is enabled
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>
Diffstat (limited to 'arch/um/os-Linux/helper.c')
-rw-r--r--arch/um/os-Linux/helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index f25c29a12d00..74ca7aabf4e1 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -71,8 +71,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
71 data.pre_data = pre_data; 71 data.pre_data = pre_data;
72 data.argv = argv; 72 data.argv = argv;
73 data.fd = fds[1]; 73 data.fd = fds[1];
74 data.buf = __cant_sleep() ? kmalloc(PATH_MAX, UM_GFP_ATOMIC) : 74 data.buf = __cant_sleep() ? uml_kmalloc(PATH_MAX, UM_GFP_ATOMIC) :
75 kmalloc(PATH_MAX, UM_GFP_KERNEL); 75 uml_kmalloc(PATH_MAX, UM_GFP_KERNEL);
76 pid = clone(helper_child, (void *) sp, CLONE_VM, &data); 76 pid = clone(helper_child, (void *) sp, CLONE_VM, &data);
77 if (pid < 0) { 77 if (pid < 0) {
78 ret = -errno; 78 ret = -errno;