summaryrefslogtreecommitdiff
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-03-30 16:20:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-20 00:25:25 -0700
commitec0ccc16a09fc32f7142ef3ddf1c2276fbbb35d0 (patch)
tree2d856d7d2771ca16efd6e6bc5e45136101abd6fa /include/linux/moduleparam.h
parent735c0f8f12402774eff2320657cbb1e7d945164a (diff)
module: add core_param_unsafe
Similarly to module_param_unsafe(), add the helper to be used by core code wishing to expose unsafe debugging or testing parameters that taint the kernel when set. Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 13923709d30d..6480dcaca275 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -310,6 +310,15 @@ static inline void __kernel_param_unlock(void)
#define core_param(name, var, type, perm) \
param_check_##type(name, &(var)); \
__module_param_call("", name, &param_ops_##type, &var, perm, -1, 0)
+
+/**
+ * core_param_unsafe - same as core_param but taints kernel
+ */
+#define core_param_unsafe(name, var, type, perm) \
+ param_check_##type(name, &(var)); \
+ __module_param_call("", name, &param_ops_##type, &var, perm, \
+ -1, KERNEL_PARAM_FL_UNSAFE)
+
#endif /* !MODULE */
/**