New: Exported functions and variables should not be reachable by the outside of the module until module_init finishes
Quoted 21 lines · On Wed, 29 Aug 2007 11:33:06 -0700 (PDT) [email protected] wrote:
http://bugzilla.kernel.org/show_bug.cgi?id=8957
Summary: Exported functions and variables should not be reachable
by the outside of the module untilmodule_initfinishes
Product: Other
Version: 2.5
KernelVersion: 2.6.23-rc4
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Modules
AssignedTo: [email protected]
ReportedBy: [email protected]Problem Description: a module's exported functions can be called before before they are properly initialized by the
module_initfunction.
Quoted 8 lines
Steps to reproduce: write a module that exports functions that require initialization by the
module_initfunction to work correctly.E.g. spin lock variables are no longer allowed to be initialized by C initializers of the module but only by
spin_lock_initthat can be called by themodule_initfunction. If an exported function callsspin_lockbefore it is initialized, it deadlocks.
ooh, nice bug ;)