]> git.baikalelectronics.ru Git - kernel.git/commit
kallsyms: refactor {,module_}kallsyms_on_each_symbol
authorChristoph Hellwig <hch@lst.de>
Tue, 2 Feb 2021 12:13:26 +0000 (13:13 +0100)
committerJessica Yu <jeyu@kernel.org>
Mon, 8 Feb 2021 11:22:08 +0000 (12:22 +0100)
commitcef8f63a2932bf180ba964d09b8a87d55e2c7075
tree14ff7b6f382399544e4dbc530dfadf9b6748e3c6
parent8924061faf6b3a0ad949812a04d8f41696b22d92
kallsyms: refactor {,module_}kallsyms_on_each_symbol

Require an explicit call to module_kallsyms_on_each_symbol to look
for symbols in modules instead of the call from kallsyms_on_each_symbol,
and acquire module_mutex inside of module_kallsyms_on_each_symbol instead
of leaving that up to the caller.  Note that this slightly changes the
behavior for the livepatch code in that the symbols from vmlinux are not
iterated anymore if objname is set, but that actually is the desired
behavior in this case.

Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/kallsyms.c
kernel/livepatch/core.c
kernel/module.c