ac97 oops in ali modem driver
I just had a user file a Fedora bug with the following oops.
Unable to handle kernel NULL pointer dereference at virtual address 000001a4 printing eip: df969005 *pde = 12620067 Oops: 0000 [#1] Modules linked in: nfs radeon drm nfsd exportfs lockd nfs_acl autofs4 sunrpc pcmcia dm_mod vid
eo button battery ac yenta_socket rsrc_nonstatic pcmcia_core ohci_hcd shpchp i2c_ali1535 i2c_c ore snd_ali5451 snd_ac97_codec snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_de vice snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc prism54 8139cp m ii floppy joydev ext3 jbd
CPU: 0 EIP: 0060:[<df969005>] Not tainted VLI EFLAGS: 00010202 (2.6.13-1.1526_FC4)
EIP is at snd_ac97_valid_reg+0x5/0x135 [snd_ac97_codec]
eax: 00000000 ebx: 00000040 ecx: 00000000 edx: 00000040
esi: 00000000 edi: 00000040 ebp: 00001f40 esp: ca515edc
ds: 007b es: 007b ss: 0068
Process gstreamer-prope (pid: 10503, threadinfo=ca515000 task=da809aa0)
Stack: 00000040 df969149 de2ac800 00000001 d4fb1000 de3bf560 df9207ca 00000000
fffffff4 de3bf560 db6b9000 df92d6b2 00000000 00000001 00000246 00000000
00000000 00000000 0000025c 0000025c d4fb1000 d4fb1000 fffffff4 de3bf560
Call Trace:
[<df969149>] snd_ac97_write+0x14/0x5a [snd_ac97_codec]
[<df9207ca>] snd_ali_modem_hw_params+0x2c/0x4c [snd_ali5451]
[<df92d6b2>] snd_pcm_hw_params+0x290/0x609 [snd_pcm]
[<df92da7b>] snd_pcm_hw_params_user+0x50/0x6a [snd_pcm]
[<df9349b5>] snd_pcm_capture_ioctl1+0x2e/0x1ce [snd_pcm]
[<df934b70>] snd_pcm_capture_ioctl+0x0/0x1b [snd_pcm]
[<c01bf0e9>] do_ioctl+0x19/0x55
[<c01bf217>] vfs_ioctl+0x50/0x1aa
[<c01bf3ce>] sys_ioctl+0x5d/0x6b
[<c0104409>] sysenter_past_esp+0x56/0x79
Code: Bad EIP value.It looks like we're somehow ending up with card->ac97 == NULL. This kernel is based on 2.6.13.2, with no ALSA patches other than an unrelated emu10k1 diff. From eyeballing a quick diff of the ali driver between 2.6.13.2 and current upstream 2.6.14rc3, it doesn't look like this has been addressed already.
Dave
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 1 line · Dave Jones
I just had a user file a Fedora bug with the following oops.
Is there other messages from ali5451 loading? The sound works I guess? What do you see when 'ls /proc/asound/ali5451/codec97#0'?
Sasha.
Quoted 46 lines
Unable to handle kernel NULL pointer dereference at virtual address 000001a4 printing eip: df969005 *pde = 12620067 Oops: 0000 [#1] Modules linked in: nfs radeon drm nfsd exportfs lockd nfs_acl autofs4 sunrpc pcmcia dm_mod video button battery ac
yenta_socketrsrc_nonstaticpcmcia_coreohci_hcdshpchpi2c_ali1535i2c_coresnd_ali5451snd_ac97_codecsnd_seq_dummysnd_seq_osssnd_seq_midi_eventsnd_seqsnd_seq_devicesnd_pcm_osssnd_mixer_osssnd_pcmsnd_timersnd soundcoresnd_page_allocprism54 8139cp m ii floppy joydev ext3 jbdCPU: 0 EIP: 0060:[<df969005>] Not tainted VLI EFLAGS: 00010202 (2.6.13-1.1526_FC4)EIP is at
snd_ac97_valid_reg+0x5/0x135[snd_ac97_codec]
eax: 00000000 ebx: 00000040 ecx: 00000000 edx: 00000040
esi: 00000000 edi: 00000040 ebp:00001f40esp:ca515edc
ds: 007b es: 007b ss: 0068
Process gstreamer-prope (pid: 10503, threadinfo=ca515000 task=da809aa0)Stack: 00000040 df969149 de2ac800 00000001 d4fb1000 de3bf560 df9207ca 00000000 fffffff4 de3bf560 db6b9000 df92d6b2 00000000 00000001 00000246 00000000 00000000 00000000 0000025c 0000025c d4fb1000 d4fb1000 fffffff4 de3bf560 Call Trace: [<df969149>] snd_ac97_write+0x14/0x5a [snd_ac97_codec] [<df9207ca>] snd_ali_modem_hw_params+0x2c/0x4c [snd_ali5451] [<df92d6b2>] snd_pcm_hw_params+0x290/0x609 [snd_pcm] [<df92da7b>] snd_pcm_hw_params_user+0x50/0x6a [snd_pcm] [<df9349b5>] snd_pcm_capture_ioctl1+0x2e/0x1ce [snd_pcm] [<df934b70>] snd_pcm_capture_ioctl+0x0/0x1b [snd_pcm] [<c01bf0e9>] do_ioctl+0x19/0x55 [<c01bf217>] vfs_ioctl+0x50/0x1aa [<c01bf3ce>] sys_ioctl+0x5d/0x6b [<c0104409>] sysenter_past_esp+0x56/0x79 Code: Bad EIP value.It looks like we're somehow ending up with
card->ac97== NULL. This kernel is based on 2.6.13.2, with no ALSA patches other than an unrelated emu10k1 diff. From eyeballing a quick diff of the ali driver between 2.6.13.2 and current upstream 2.6.14rc3, it doesn't look like this has been addressed already.Dave
Quoted 8 lines
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
At Mon, 3 Oct 2005 17:34:48 +0300,
Quoted 6 lines · Sasha Khapyorsky
Quoted 1 line · Dave Jones
I just had a user file a Fedora bug with the following oops.
Is there other messages from ali5451 loading? The sound works I guess? What do you see when 'ls /proc/asound/ali5451/codec97#0'?
Maybe the probe of secondary codec failed?
Then the patch below might fix.
Takashi
sound/pci/ali5451/ali5451.c +4 -2
@@ -1994,8 +1994,10 @@if ((err =snd_ac97_mixer (codec->ac97_bus, &ac97, &codec->ac97[i])) <0 ) {snd_printk ("ali mixer %d creating error.\n" , i);if (i ==0 ) -return err; - } +return err; + codec->num_of_codecs =1 ; +break ; + } }if (codec->spdif_support) {
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 11 lines · Takashi Iwai
At Mon, 3 Oct 2005 17:34:48 +0300,
Quoted 6 lines · Sasha Khapyorsky
Quoted 1 line · Dave Jones
I just had a user file a Fedora bug with the following oops.
Is there other messages from ali5451 loading? The sound works I guess? What do you see when 'ls /proc/asound/ali5451/codec97#0'?
Maybe the probe of secondary codec failed?
Then the patch below might fix.
Quite possible and we expect to see something about it in dmesg. The patch is obviously correct and will help in such cases. Frankly I would prefer like this:
pci/ali5451/ali5451.c +1 -1
@@ -1844,7 +1844,7 @@ static int __devinit snd_ali_build_pcms( {int i, err;for (i =0 ; i < codec->num_of_codecs && i <ARRAY_SIZE (ali_pcms) ; i++) -if ((err =snd_ali_pcm (codec, i, &ali_pcms[i])) <0 ) +if (codec->ac97[i] && (err =snd_ali_pcm (codec, i, &ali_pcms[i])) <0 )return err;return 0 ; }
So it will be "more" on controller's side. But not critical.
Thanks,
Sasha.
Quoted 8 lines
sound/pci/ali5451/ali5451.c +0
-0@@ -1994,8 +1994,10 @@if ((err =snd_ac97_mixer (codec->ac97_bus, &ac97, &codec->ac97[i])) <0 ) {snd_printk ("ali mixer %d creating error.\n" , i);
sound/pci/ali5451/ali5451.c line 2003
Quoted 10 lines
sound/pci/ali5451/ali5451.c +4
-2if (i ==0 ) -return err; - } +return err; + codec->num_of_codecs =1 ; +break ; + } }if (codec->spdif_support) {
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
At Wed, 5 Oct 2005 03:01:32 +0300,
Quoted 32 lines · Sasha Khapyorsky
Quoted 11 lines · Takashi Iwai
At Mon, 3 Oct 2005 17:34:48 +0300,
Quoted 6 lines · Sasha Khapyorsky
Quoted 1 line · Dave Jones
I just had a user file a Fedora bug with the following oops.
Is there other messages from ali5451 loading? The sound works I guess? What do you see when 'ls /proc/asound/ali5451/codec97#0'?
Maybe the probe of secondary codec failed?
Then the patch below might fix.Quite possible and we expect to see something about it in dmesg. The patch is obviously correct and will help in such cases. Frankly I would prefer like this:
pci/ali5451/ali5451.c +1
-1@@ -1844,7 +1844,7 @@ static int __devinit snd_ali_build_pcms( {int i, err;for (i =0 ; i < codec->num_of_codecs && i <ARRAY_SIZE (ali_pcms) ; i++) -if ((err =snd_ali_pcm (codec, i, &ali_pcms[i])) <0 ) +if (codec->ac97[i] && (err =snd_ali_pcm (codec, i, &ali_pcms[i])) <0 )return err;return 0 ; }
Quoted 1 line
So it will be "more" on controller's side. But not critical.
The NULL ac97[] and pcm[] are referred in suspend/resume code, too. It should be fixed in your case. Or correct codec->num_of_codecs as in my patch.
Anyway, I already committed my patch to ALSA CVS tree. A clean up patch is welcome, of course :)
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 2 lines · Takashi Iwai
The NULL ac97[] and pcm[] are referred in suspend/resume code, too.
Sure, and there are already pcm[i] and ac97[i] != NULL checkings.
Quoted 4 lines
It should be fixed in your case. Or correct
codec->num_of_codecsas in my patch.Anyway, I already committed my patch to ALSA CVS tree.
Yeah, I see :). Let's run your patch - my note was really cosmetic.
Sasha.
Quoted 5 lines
A clean up patch is welcome, of course :)
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl