[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454993424-31031-3-git-send-email-jeyu@redhat.com>
Date: Mon, 8 Feb 2016 23:50:22 -0500
From: Jessica Yu <jeyu@...hat.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>,
Seth Jennings <sjenning@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Vojtech Pavlik <vojtech@...e.com>,
Miroslav Benes <mbenes@...e.cz>,
Petr Mladek <pmladek@...e.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>
Cc: live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
Jessica Yu <jeyu@...hat.com>
Subject: [PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING before going notifiers are called
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@...hat.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
Powered by blists - more mailing lists