summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2012-02-01 03:33:14 +0100
committerRusty Russell <rusty@rustcorp.com.au>2012-03-26 04:20:50 +0200
commit02608bef8f774c058779546926889a2f2717a499 (patch)
treefdbdd5918c0d9a9f142c6c88535a2b18f13ce02c /kernel
parentMerge tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/linu... (diff)
downloadlinux-02608bef8f774c058779546926889a2f2717a499.tar.xz
linux-02608bef8f774c058779546926889a2f2717a499.zip
module: add kernel param to force disable module load
Sometimes we need to test a kernel of same version with code or config option changes. We already have sysctl to disable module load, but add a kernel parameter will be more convenient. Since modules_disabled is int, so here use bint type in core_param. TODO: make sysctl accept bool and change modules_disabled to bool Signed-off-by: Dave Young <dyoung@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 2c932760fd33..7e31da9750c0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -105,6 +105,7 @@ struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
/* Block module loading/unloading? */
int modules_disabled = 0;
+core_param(nomodule, modules_disabled, bint, 0);
/* Waiting for a module to finish initializing? */
static DECLARE_WAIT_QUEUE_HEAD(module_wq);