Re: my patches won't compile under 2.4.7

Richard Gooch
2001-08-01T14:57:40Z

Kirk Reiser writes:
> On another note related to devfs though when I compile devfs in the
> system just hangs. I am wondering if I am registering my synth device
> before devfs has memory allocated. I register very early in the boot
> process in console_init() and experienced similar problems before because I
> don't think kmalloc() may be available that early in the sequence.
>
> The question then is, do you think that could be why the system is
> hanging with devfs configured in?

Yes. Calling kmalloc() before MM is set up is not allowed. See the
comments in drivers/char/console.c which talks about not calling
kmalloc() before console_init().

Simply move your driver registration after MM is set up. Use
module_init() to declare your initialisation function. This works for
both modules and built-in drivers. Registering a driver before MM
setup is considered bad practice.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca