diff options
-rw-r--r-- | kernel/params.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/params.c b/kernel/params.c index e265b13195b1..1fc4ac746cd8 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -356,6 +356,10 @@ int param_set_copystring(const char *val, struct kernel_param *kp) | |||
356 | { | 356 | { |
357 | struct kparam_string *kps = kp->arg; | 357 | struct kparam_string *kps = kp->arg; |
358 | 358 | ||
359 | if (!val) { | ||
360 | printk(KERN_ERR "%s: missing param set value\n", kp->name); | ||
361 | return -EINVAL; | ||
362 | } | ||
359 | if (strlen(val)+1 > kps->maxlen) { | 363 | if (strlen(val)+1 > kps->maxlen) { |
360 | printk(KERN_ERR "%s: string doesn't fit in %u chars.\n", | 364 | printk(KERN_ERR "%s: string doesn't fit in %u chars.\n", |
361 | kp->name, kps->maxlen-1); | 365 | kp->name, kps->maxlen-1); |