Re: my patches won't compile under 2.4.7

Richard Gooch (rgooch@ras.ucalgary.ca)
Wed, 1 Aug 2001 08:57:26 -0600


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/