Here are some cases where __init code or data is referenced by non-__init code.This is not actually a bug, but it may be bad style (and thus could lead to a bug). It is possible that something that uses IPMI can do some IPMI things before IPMI is initialized. This can only happen during initialization, though. Thus the check; once IPMI is initialized the function will never be called.
Questions:
- Is init_module allowed, required or forbidden to be __init?
- Ditto for Scsi_Host_Template.detect()?
- Ditto for net_device->set_config()?
Thanks for looking at these potential bugs, and sorry if I've made any mistakes.
Best,
Rob
P.S. All these bugs were found with Cqual, the bug-finding tool
developed by Jeff Foster, John Kodumal, and many others, and available
at http://www.cs.umd.edu/~jfoster/cqual/, although the currently
released version of cqual only has primitive support for __init bug-finding.
** Possible bug:
** drivers/char/ipmi/ipmi_msghandler.c:ipmi_init_msghandler() (__init)
called by numerous non-__init functions
Note: ipmi_init_msghandler() is an alias for init_module
Fix: declare ipmi_init_msghandler non-__init.