module: check kernel param length at compile time, not runtime

The kparam code tries to handle over-length parameter prefixes at
runtime.  Not only would I bet this has never been tested, it's not
clear that truncating names is a good idea either.

So let's check at compile time.  We need to move the #define to
moduleparam.h to do this, though.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2008-10-22 10:00:22 -05:00
parent d72b37513c
commit 730b69d225
3 changed files with 8 additions and 7 deletions

View file

@ -29,7 +29,7 @@
#define MODULE_SYMBOL_PREFIX ""
#endif
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
struct kernel_symbol
{