On Fri 2016-03-11 15:03:47, Jessica Yu wrote:
> Put all actions in complete_formation() that are performed after
> module->state is set to MODULE_STATE_COMING into a separate function
> prepare_coming_module(). This split prepares for the removal of the
> livepatch module notifiers in favor of hard-coding function calls to
> klp_module_{coming,going} in the module loader.
> 
> The complete_formation -> prepare_coming_module split will also make error
> handling easier since we can jump to the appropriate error label to do any
> module GOING cleanup after all the COMING-actions have completed.
> 
> Signed-off-by: Jessica Yu <j...@redhat.com>
> Reviewed-by: Josh Poimboeuf <jpoim...@redhat.com>
> Acked-by: Rusty Russell <ru...@rustcorp.com.au>
> ---
>  kernel/module.c | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/kernel/module.c b/kernel/module.c
> index 87cfeb2..1981ae0 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3312,6 +3312,14 @@ out_unlocked:
>       return err;
>  }
>  
> +static int prepare_coming_module(struct module *mod)
> +{
> +     ftrace_module_enable(mod);
> +     blocking_notifier_call_chain(&module_notify_list,
> +                                  MODULE_STATE_COMING, mod);
> +     return 0;
> +}

Nit, just in case you send a new version. Please, move this below
complete_formation(). It is nice when the funtions are defined
in the same order as they are called :-)

It is a cosmetic change and it should not invalidate other acks.

In each case, the patch looks fine:

Reviewed-by: Petr Mladek <pmla...@suse.cz>

Best Regards,
Petr

Reply via email to