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.
Brad Boyer
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kelvin lim
Sent: Monday, December 03, 2007 6:57 PM
To: [email protected]
Subject: [rhelv5-list] insmod module failed : "ERROR : Unable to
allocatememory"
Hi,
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 2.6.15.5) 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 into......
Using kernel 2.6.15.5 (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)) == NULL)
return ERR_PTR(-ENOMEM); // RHEL5 COULD BE FAILING HERE....
....
}
Is there any way to find ! out what's the max size RHEL5 kernel module.c
used for checking ?
Best Regards
Kelvin
________________________________
Get your free suite of Windows Live services! Windows Live
<http://www.get.live.com/wl/all>
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list