From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934483AbcCNPM7 (ORCPT ); Mon, 14 Mar 2016 11:12:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:36161 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932353AbcCNPM6 (ORCPT ); Mon, 14 Mar 2016 11:12:58 -0400 Date: Mon, 14 Mar 2016 16:12:56 +0100 From: Petr Mladek To: Jessica Yu Cc: Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , Miroslav Benes , Rusty Russell , Steven Rostedt , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] modules: split part of complete_formation() into prepare_coming_module() Message-ID: <20160314151256.GV10940@pathway.suse.cz> References: <1457726628-9171-1-git-send-email-jeyu@redhat.com> <1457726628-9171-2-git-send-email-jeyu@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457726628-9171-2-git-send-email-jeyu@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reviewed-by: Josh Poimboeuf > Acked-by: Rusty Russell > --- > 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 Best Regards, Petr