]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
module: set nx before marking module MODULE_STATE_COMING.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 14 May 2014 01:24:19 +0000 (10:54 +0930)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 12:13:44 +0000 (14:13 +0200)
commit9dde9641037a74e968b79685ddaf2ed1311152e8
treefc01b1224e7da5bad6f4004765a4ac3503d7b8f3
parentf80c5f13970259005e64365c80c8d8f00d787c79
module: set nx before marking module MODULE_STATE_COMING.

commit 4982223e51e8ea9d09bb33c8323b5ec1877b2b51 upstream.

We currently set RO & NX on modules very late: after we move them from
MODULE_STATE_UNFORMED to MODULE_STATE_COMING, and after we call
parse_args() (which can exec code in the module).

Much better is to do it in complete_formation() and then call
the notifier.

This means that the notifiers will be called on a module which
is already RO & NX, so that may cause problems (ftrace already
changed so they're unaffected).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
kernel/module.c