From: Randy Dunlap <randy.dunlap@oracle.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: LKML <linux-kernel@vger.kernel.org>, rusty@rustcorp.com.au
Subject: [PATCH] Re: kernel oops with badly formatted module option
Date: Sat, 7 Apr 2007 19:47:00 -0700 [thread overview]
Message-ID: <20070407194700.38138108.randy.dunlap@oracle.com> (raw)
In-Reply-To: <4618356D.70303@lwfinger.net>
On Sat, 07 Apr 2007 19:21:01 -0500 Larry Finger wrote:
> With the following line in /etc/modprobe.conf.local:
>
> options bcm43xx fwpostfix = ".fw3" locale=8
>
> the kernel oops below is generated. I realize that the line should have no whitespace around the
> "=", but I do not feel that an oops is the best way to report the syntax error. Could there be a more gentle failure?
From: Randy Dunlap <randy.dunlap@oracle.com>
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>
---
kernel/params.c | 4 ++++
1 file changed, 4 insertions(+)
--- linux-2.6.21-rc6.orig/kernel/params.c
+++ linux-2.6.21-rc6/kernel/params.c
@@ -356,6 +356,10 @@ int param_set_copystring(const char *val
{
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);
next prev parent reply other threads:[~2007-04-08 2:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-08 0:21 Larry Finger
2007-04-08 2:47 ` Randy Dunlap [this message]
2007-04-08 3:43 ` [PATCH] " Larry Finger
2007-04-09 1:24 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070407194700.38138108.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®