Merge tag 'modules-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2021 19:29:36 +0000 (12:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2021 19:29:36 +0000 (12:29 -0700)
commit65c61de9d090edb8a3cfb3f45541e268eb2cdb13
treef8298d9571a200b42824929bfd2d679fce162361
parentc70a4be130de333ea079c59da41cc959712bb01c
parent33121347fb1c359bd6e3e680b9f2c6ced5734a81
Merge tag 'modules-for-v5.13' of git://git./linux/kernel/git/jeyu/linux

Pull module updates from Jessica Yu:
 "Fix an age old bug involving jump_calls and static_labels when
  CONFIG_MODULE_UNLOAD=n.

  When CONFIG_MODULE_UNLOAD=n, it means you can't unload modules, so
  normally the __exit sections of a module are not loaded at all.
  However, dynamic code patching (jump_label, static_call, alternatives)
  can have sites in __exit sections even if __exit is never executed.

  Reported by Peter Zijlstra:
     'Alternatives, jump_labels and static_call all can have relocations
      into __exit code. Not loading it at all would be BAD.'

  Therefore, load the __exit sections even when CONFIG_MODULE_UNLOAD=n,
  and discard them after init"

* tag 'modules-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
  module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD
kernel/module.c