diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-03-30 19:20:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-20 03:25:25 -0400 |
commit | ec0ccc16a09fc32f7142ef3ddf1c2276fbbb35d0 (patch) | |
tree | 2d856d7d2771ca16efd6e6bc5e45136101abd6fa /include/linux/moduleparam.h | |
parent | 735c0f8f12402774eff2320657cbb1e7d945164a (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.h | 9 |
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) | |||
310 | #define core_param(name, var, type, perm) \ | 310 | #define core_param(name, var, type, perm) \ |
311 | param_check_##type(name, &(var)); \ | 311 | param_check_##type(name, &(var)); \ |
312 | __module_param_call("", name, ¶m_ops_##type, &var, perm, -1, 0) | 312 | __module_param_call("", name, ¶m_ops_##type, &var, perm, -1, 0) |
313 | |||
314 | /** | ||
315 | * core_param_unsafe - same as core_param but taints kernel | ||
316 | */ | ||
317 | #define core_param_unsafe(name, var, type, perm) \ | ||
318 | param_check_##type(name, &(var)); \ | ||
319 | __module_param_call("", name, ¶m_ops_##type, &var, perm, \ | ||
320 | -1, KERNEL_PARAM_FL_UNSAFE) | ||
321 | |||
313 | #endif /* !MODULE */ | 322 | #endif /* !MODULE */ |
314 | 323 | ||
315 | /** | 324 | /** |