[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>

authored by Randy Dunlap and committed by Linus Torvalds fe20e581 80584ff3

+4
+4
kernel/params.c
··· 356 356 { 357 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 363 if (strlen(val)+1 > kps->maxlen) { 360 364 printk(KERN_ERR "%s: string doesn't fit in %u chars.\n", 361 365 kp->name, kps->maxlen-1);