I have loaded modules up to nearly 60MB in
the RHEL5 default kernel, so it can work in at least some situations. The other
reply mentioned how to get the source, but there are some other things you
should probably investigate. It’s hard to just pull a number out, but
there has always been a limit on the total space available to be allocated
using vmalloc. If you are using an i686 system, you may have more restrictive
limits enforced on your memory usage. It would depend on exactly what was
loaded that used vmalloc, which may explain why it works when you compile your
own kernel. It’s worth noting in case you haven’t looked that far
that this allocation in the module loader is only temporary and should always
be freed after the module is finished loading.
From: rhelv5-list-bounces redhat com
[mailto:rhelv5-list-bounces redhat com] On
Behalf Of Kelvin lim
Sent: Monday, December 03, 2007
To: rhelv5-list redhat com
Subject: [rhelv5-list] insmod
module failed : "ERROR : Unable to allocatememory"
I'm having problem loading my audio driver module ( size 10MB ) on RHEL5
default kernel. It prompt error "Unable to allocate memory".......
Thus, I tried compiling my own vanilla kernel (ver 188.8.131.52) to debug this
issue. Surprisingly, I'm able to load my module ! Problem now is I can't debug
RH5 kernel cos it doesn't come with the source (module.c) which i need to trace
Using kernel 184.108.40.206 (module.c) , I believe the problem could be here :
static struct module *load_module(.....)
/* Suck in entire file: we'll want most of it. */
/* vmalloc barfs on "unusual" numbers. Check here
if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) ==
// RHEL5 COULD BE FAILING HERE....
Is there any way to find ! out what's the max size RHEL5 kernel module.c used
for checking ?
Get your free suite of Windows Live services! Windows Live