Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe20e581a72979917e35d5146458ceba79be391f Commit: fe20e581a72979917e35d5146458ceba79be391f Parent: 80584ff3b99c36ead7e130e453b3a48b18072d18 Author: Randy Dunlap <[EMAIL PROTECTED]> AuthorDate: Wed Apr 11 23:28:41 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Thu Apr 12 15:31:41 2007 -0700
[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 <[EMAIL PROTECTED]> Acked-by: Larry Finger <[EMAIL PROTECTED]> Acked-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- 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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html