Re: [PATCH] module: correctly exit module_kallsyms_on_each_symbol when fn() != 0

From: Miroslav Benes
Date: Thu May 20 2021 - 10:41:15 EST


On Thu, 20 May 2021, Jon Mediero wrote:

> Commit 013c1667cf78 ("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: 013c1667cf78 ("kallsyms: refactor {,module_}kallsyms_on_each_symbol")
> Signed-off-by: Jon Mediero <jmdr@xxxxxxxxxxx>

Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>

M