* kernel oops with badly formatted module option
@ 2007-04-08 0:21 Larry Finger
2007-04-08 2:47 ` [PATCH] " Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Larry Finger @ 2007-04-08 0:21 UTC (permalink / raw)
To: LKML; +Cc: rusty
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?
This is an x86_64 system running 2.6.16-rc5 from Linville's wireless-2.6 tree. The "dirty" refers to
patches for the bcm43xx driver that are under test.
Larry
kernel: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
kernel: [<ffffffff80242b76>] param_set_copystring+0x15/0x4b
kernel: PGD 3ce82067 PUD 34b0c067 PMD 0
kernel: Oops: 0000 [1] SMP
kernel: CPU 0
kernel: Modules linked in: af_packet snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device
cpufreq_conservative cpuf
req_ondemand cpufreq_userspace cpufreq_powersave powernow_k8 freq_table button battery ac loop
snd_hda_intel snd_hda_codec snd_pcm snd_t
imer snd ohci1394 soundcore snd_page_alloc ieee1394 ide_cd cdrom ehci_hcd ohci_hcd sdhci mmc_core
usbcore forcedeth i2c_nforce2 firmware
_class ieee80211softmac ieee80211 ieee80211_crypt ext3 mbcache jbd sg edd fan sata_nv libata amd74xx
thermal processor sd_mod scsi_mod i
de_disk ide_core
kernel: Pid: 4325, comm: modprobe Not tainted 2.6.21-rc5-L2.6-gae6ff7a1-dirty #5
kernel: RIP: 0010:[<ffffffff80242b76>] [<ffffffff80242b76>] param_set_copystring+0x15/0x4b
kernel: RSP: 0018:ffff81003dee3dd8 EFLAGS: 00010286
kernel: RAX: 0000000000000000 RBX: ffff810053736c7a RCX: ffffffffffffffff
kernel: RDX: 0000000000000040 RSI: ffffffff882fee68 RDI: 0000000000000000
kernel: RBP: ffff81003dee3dd8 R08: ffffffff88307ea0 R09: 0000000000000000
kernel: R10: 0000000000000006 R11: ffffffff88307e88 R12: 0000000000000028
kernel: R13: ffff810053736c70 R14: 0000000000000000 R15: ffffffff88308098
kernel: FS: 00002ae7eb6246f0(0000) GS:ffffffff80505000(0000) knlGS:00000000f70686d0
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
kernel: CR2: 0000000000000000 CR3: 0000000036ff8000 CR4: 00000000000006e0
kernel: Process modprobe (pid: 4325, threadinfo ffff81003dee2000, task ffff810035d31140)
kernel: Stack: ffff81003dee3e38 ffffffff802430ff ffffffff88308080 0000000000000000
kernel: 00000007003b74d8 ffffffff882fed78 0000000000000202 ffffc200003b77d8
kernel: 0000000000000028 ffffffff88308080 ffffffff88304c78 ffffc200003b7498
kernel: Call Trace:
kernel: [<ffffffff802430ff>] parse_args+0x139/0x216
kernel: [<ffffffff80253a2f>] sys_init_module+0x1376/0x1744
kernel: [<ffffffff802446f3>] autoremove_wake_function+0x0/0x38
kernel: [<ffffffff80350d5a>] device_remove_file+0x0/0x33
kernel: [<ffffffff803d44bc>] trace_hardirqs_on_thunk+0x35/0x37
kernel: [<ffffffff80209fae>] system_call+0x7e/0x83
kernel:
kernel: Code: f2 ae 89 d0 48 f7 d1 48 39 c1 76 1a 48 8b 36 ff ca 48 c7 c7
kernel: RIP [<ffffffff80242b76>] param_set_copystring+0x15/0x4b
kernel: RSP <ffff81003dee3dd8>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Re: kernel oops with badly formatted module option
2007-04-08 0:21 kernel oops with badly formatted module option Larry Finger
@ 2007-04-08 2:47 ` Randy Dunlap
2007-04-08 3:43 ` Larry Finger
2007-04-09 1:24 ` Rusty Russell
0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2007-04-08 2:47 UTC (permalink / raw)
To: Larry Finger; +Cc: LKML, rusty
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Re: kernel oops with badly formatted module option
2007-04-08 2:47 ` [PATCH] " Randy Dunlap
@ 2007-04-08 3:43 ` Larry Finger
2007-04-09 1:24 ` Rusty Russell
1 sibling, 0 replies; 4+ messages in thread
From: Larry Finger @ 2007-04-08 3:43 UTC (permalink / raw)
To: Randy Dunlap; +Cc: LKML, rusty
Randy Dunlap wrote:
> 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>
It works here. ACKed by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> 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);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Re: kernel oops with badly formatted module option
2007-04-08 2:47 ` [PATCH] " Randy Dunlap
2007-04-08 3:43 ` Larry Finger
@ 2007-04-09 1:24 ` Rusty Russell
1 sibling, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2007-04-09 1:24 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Larry Finger, LKML
On Sat, 2007-04-07 at 19:47 -0700, Randy Dunlap wrote:
> 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>
Thanks Randy,
I even read your patch before I wrote my own, for a change!
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-09 1:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-08 0:21 kernel oops with badly formatted module option Larry Finger
2007-04-08 2:47 ` [PATCH] " Randy Dunlap
2007-04-08 3:43 ` Larry Finger
2007-04-09 1:24 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox