Re: [PATCH] slob: fix linking for user mode linux

From: Jeff Dike
Date: Mon Feb 11 2008 - 18:33:00 EST


On Mon, Feb 11, 2008 at 02:44:21PM -0800, Christoph Lameter wrote:
> UML defined its own external __kmalloc and things. Isnt there some other
> way to fix it? I guess including slab.h is not possible here?

This is definitely dubious code on my part and I wouldn't support
Pekka's patch unless you're going to uninline __kmalloc for some
other reason.

The reason for this is that part of UML is userspace code, and thus
can't use kernel headers. However, they do need some kernel
interfaces in some form. That form has traditionally been little
wrappers in the kernel side of UML which just call the kernel
interface.

In this case, there used to be um_kmalloc, which just called kmalloc.
I've been trying to get rid of these stupid little helpers for a
while, and this is what I ended up with for kmalloc.

It would be an annoyance to reintroduce um_kmalloc, but that might be
the best thing to do here.

Jeff

--
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/