diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-13 03:02:16 +0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-13 03:02:16 +0400 |
commit | bafeafeab94b8d3019aac15c2df2ce47b08a6363 (patch) | |
tree | c121e82aee4f0969cf90dfb2dbad46d06a669696 /include/linux/moduleparam.h | |
parent | e49ce14150c64b29a8dd211df785576fa19a9858 (diff) | |
download | linux-bafeafeab94b8d3019aac15c2df2ce47b08a6363.tar.xz |
module_param: check type correctness for module_param_array
module_param_array(), unlike its non-array cousins, didn't check the type
of the variable. Fixing this found two bugs.
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: linux-media@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r-- | include/linux/moduleparam.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 7939f636c8ba..794d4b0f1215 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -395,6 +395,7 @@ extern int param_get_invbool(char *buffer, const struct kernel_param *kp); * module_param_named() for why this might be necessary. */ #define module_param_array_named(name, array, type, nump, perm) \ + param_check_##type(name, &(array)[0]); \ static const struct kparam_array __param_arr_##name \ = { .max = ARRAY_SIZE(array), .num = nump, \ .ops = ¶m_ops_##type, \ |