Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1329905

[PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING before going notifiers are called

From Jessica Yu <jeyu@redhat.com>
Newsgroups linux.kernel
Subject [PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING before going notifiers are called
Date 2016-02-09 06:00 +0100
Message-ID <r08z8-7uB-5@gated-at.bofh.it> (permalink)
References <r08z8-7uB-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In load_module(), the going notifiers are called during error handling when
an error occurs after the coming notifiers have already been called.
However, a module's state is still MODULE_STATE_COMING when the going
notifiers are called in the error path. To be consistent, also set
mod->state to MODULE_STATE_GOING before calling the going notifiers.

Signed-off-by: Jessica Yu <jeyu@redhat.com>
---
 kernel/module.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/module.c b/kernel/module.c
index a174335..77f6791 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3548,6 +3548,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
 	return do_init_module(mod);
 
  coming_cleanup:
+	mod->state = MODULE_STATE_GOING;
 	blocking_notifier_call_chain(&module_notify_list,
 				     MODULE_STATE_GOING, mod);
 
-- 
2.4.3

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/4] Fix ordering of ftrace/livepatch calls on module load and unload Jessica Yu <jeyu@redhat.com> - 2016-02-09 06:00 +0100
  [PATCH v4 1/4] modules: split part of complete_formation() into prepare_coming_module() Jessica Yu <jeyu@redhat.com> - 2016-02-09 06:00 +0100
    Re: [PATCH v4 1/4] modules: split part of complete_formation() into  prepare_coming_module() Josh Poimboeuf <jpoimboe@redhat.com> - 2016-02-09 16:50 +0100
    Re: [PATCH v4 1/4] modules: split part of complete_formation() into  prepare_coming_module() Miroslav Benes <mbenes@suse.cz> - 2016-02-10 11:20 +0100
    Re: [PATCH v4 1/4] modules: split part of complete_formation() into  prepare_coming_module() Petr Mladek <pmladek@suse.com> - 2016-02-10 13:20 +0100
  [PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING before going notifiers are called Jessica Yu <jeyu@redhat.com> - 2016-02-09 06:00 +0100
    Re: [PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING  before going notifiers are called Josh Poimboeuf <jpoimboe@redhat.com> - 2016-02-09 16:50 +0100
    Re: [PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING  before going notifiers are called Petr Mladek <pmladek@suse.com> - 2016-02-10 13:40 +0100
  [PATCH v4 3/4] ftrace/module: remove ftrace module notifier Jessica Yu <jeyu@redhat.com> - 2016-02-09 06:00 +0100
    Re: [PATCH v4 3/4] ftrace/module: remove ftrace module notifier Josh Poimboeuf <jpoimboe@redhat.com> - 2016-02-09 16:50 +0100
    Re: [PATCH v4 3/4] ftrace/module: remove ftrace module notifier Miroslav Benes <mbenes@suse.cz> - 2016-02-10 11:30 +0100
  [PATCH v4 4/4] livepatch/module: remove livepatch module notifier Jessica Yu <jeyu@redhat.com> - 2016-02-09 06:00 +0100
    Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier Josh Poimboeuf <jpoimboe@redhat.com> - 2016-02-09 16:50 +0100
    Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier Rusty Russell <rusty@rustcorp.com.au> - 2016-02-10 01:30 +0100
      Re: [PATCH v4 4/4] livepatch/module: remove livepatch module  notifier Jiri Kosina <jikos@kernel.org> - 2016-02-10 11:30 +0100
        Re: [PATCH v4 4/4] livepatch/module: remove livepatch module  notifier Jiri Kosina <jikos@kernel.org> - 2016-02-15 00:40 +0100
          Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier Josh Poimboeuf <jpoimboe@redhat.com> - 2016-02-16 00:30 +0100
            Re: [PATCH v4 4/4] livepatch/module: remove livepatch module  notifier Jiri Kosina <jikos@kernel.org> - 2016-02-16 00:50 +0100
              Re: livepatch/module: remove livepatch module notifier Jessica Yu <jeyu@redhat.com> - 2016-02-16 01:50 +0100
                Re: livepatch/module: remove livepatch module notifier Miroslav Benes <mbenes@suse.cz> - 2016-02-16 09:50 +0100
                Re: livepatch/module: remove livepatch module notifier Jessica Yu <jeyu@redhat.com> - 2016-02-16 21:00 +0100

csiph-web