]> git.baikalelectronics.ru Git - kernel.git/commit
module: correctly exit module_kallsyms_on_each_symbol when fn() != 0
authorJon Mediero <jmdr@disroot.org>
Thu, 20 May 2021 12:23:26 +0000 (14:23 +0200)
committerJessica Yu <jeyu@kernel.org>
Wed, 26 May 2021 12:55:45 +0000 (14:55 +0200)
commitd8b523650eb7fde7e5e3af7514085f28b83e04ae
treeb9e995fcb120cd0f829983170af70997f5686a23
parent1f58c3247d30d826d2e6fc5ed07a7d9866ee7a4d
module: correctly exit module_kallsyms_on_each_symbol when fn() != 0

Commit cef8f63a2932 ("kallsyms: refactor
{,module_}kallsyms_on_each_symbol") replaced the return inside the
nested loop with a break, changing the semantics of the function: the
break only exits the innermost loop, so the code continues iterating the
symbols of the next module instead of exiting.

Fixes: cef8f63a2932 ("kallsyms: refactor {,module_}kallsyms_on_each_symbol")
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jon Mediero <jmdr@disroot.org>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c