module: Call module notifier on failure after complete_formation()
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 8 May 2015 17:36:23 +0000 (03:06 +0930)
committerJiri Slaby <jslaby@suse.cz>
Tue, 5 Jan 2016 15:51:53 +0000 (16:51 +0100)
commitff69744b4eee3af797f92d9756902078e4249b19
tree9973f4ab9b25425f3b8230cc67ee42d794c5d51e
parentc746b3ce1c9ef2026dda724bc84560649ffe374c
module: Call module notifier on failure after complete_formation()

commit 37815bf866ab6722a47550f8d25ad3f1a16a680c upstream.

The module notifier call chain for MODULE_STATE_COMING was moved up before
the parsing of args, into the complete_formation() call. But if the module failed
to load after that, the notifier call chain for MODULE_STATE_GOING was
never called and that prevented the users of those call chains from
cleaning up anything that was allocated.

Link: http://lkml.kernel.org/r/554C52B9.9060700@gmail.com
Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Fixes: 4982223e51e8 "module: set nx before marking module MODULE_STATE_COMING"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
kernel/module.c