diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2007-04-11 23:28:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-12 15:31:41 -0700 |
commit | fe20e581a72979917e35d5146458ceba79be391f (patch) | |
tree | 37c5d2639da3c4c1ad9aa5d1fc0e3fa124b1f071 /kernel | |
parent | 80584ff3b99c36ead7e130e453b3a48b18072d18 (diff) | |
download | kernel_samsung_smdk4412-fe20e581a72979917e35d5146458ceba79be391f.zip kernel_samsung_smdk4412-fe20e581a72979917e35d5146458ceba79be391f.tar.gz kernel_samsung_smdk4412-fe20e581a72979917e35d5146458ceba79be391f.tar.bz2 |
[PATCH] fix kernel oops with badly formatted module option
Catch malformed kernel parameter usage of "param = value". Spaces are not
supported, but don't cause a kernel fault on such usage, just report an
error.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-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 e265b13..1fc4ac7 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -356,6 +356,10 @@ int param_set_copystring(const char *val, struct kernel_param *kp) { struct kparam_string *kps = kp->arg; + if (!val) { + printk(KERN_ERR "%s: missing param set value\n", kp->name); + return -EINVAL; + } if (strlen(val)+1 > kps->maxlen) { printk(KERN_ERR "%s: string doesn't fit in %u chars.\n", kp->name, kps->maxlen-1); |