• Linus Torvalds's avatar
    Merge tag 'modules-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 312dcaf9
    Linus Torvalds authored
    Pull modules updates from Jessica Yu:
     "Summary of modules changes for the 5.11 merge window:
    
       - Fix a race condition between systemd/udev and the module loader.
    
         The module loader was sending a uevent before the module was fully
         initialized (i.e., before its init function has been called). This
         means udev can start processing the module uevent before the module
         has finished initializing, and some udev rules expect that the
         module has initialized already upon receiving the uevent.
    
         This resulted in some systemd mount units failing if udev processes
         the event faster than the module can finish init. This is fixed by
         delaying the uevent until after the module has called its init
         routine.
    
       - Make the linker array sections for kernel params and module version
         attributes more robust by switching to use the alignment of the
         type in question.
    
         Namely, linker section arrays will be constructed using the
         alignment required by the struct (using __alignof__()) as opposed
         to a specific value such as sizeof(void *) or sizeof(long). This is
         less likely to cause breakages should the size of the type ever
         change (Johan Hovold)
    
       - Fix module state inconsistency by setting it back to GOING when a
         module fails to load and is on its way out (Miroslav Benes)
    
       - Some comment and code cleanups (Sergey Shtylyov)"
    
    * tag 'modules-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
      module: delay kobject uevent until after module init call
      module: drop semicolon from version macro
      init: use type alignment for kernel parameters
      params: clean up module-param macros
      params: use type alignment for kernel parameters
      params: drop redundant "unused" attributes
      module: simplify version-attribute handling
      module: drop version-attribute alignment
      module: fix comment style
      module: add more 'kernel-doc' comments
      module: fix up 'kernel-doc' comments
      module: only handle errors with the *switch* statement in module_sig_check()
      module: avoid *goto*s in module_sig_check()
      module: merge repetitive strings in module_sig_check()
      module: set MODULE_STATE_GOING state when a module fails to load
    312dcaf9
module.c 119 KB