tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Modules loading modules?



On Mon, 26 Jul 2010, Jukka Ruohonen wrote:

On Mon, Jul 26, 2010 at 06:41:11AM +1000, matthew green wrote:
it seems to me the root problem is that module_mutex is held while
calling into the module startup routines.

Here is one related question: is it ensured that the module lock is dropped
immediately after a modular device driver returns from its attachment
routine?  I am thinking of a case where a modular driver defers its
configuration by using config_interrupts(9) or config_finalize_register(9).

Not necessarily.

If a module is being loaded as a dependency of (required by) another module, then the lock is not dropped.

The lock is dropped only after the requested module and all of its dependencies have been loaded and their xxx_modcmd() have been called.



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index