From: Takashi Iwai <tiwai@suse.de>
To: "Ozan Çağlayan" <ozan@pardus.org.tr>
Cc: alsa-devel@alsa-project.org
Subject: Re: [BUG] NULL pointer dereference in patch_sigmatel.c
Date: Mon, 10 Aug 2009 07:48:55 +0200 [thread overview]
Message-ID: <s5hhbwgnrqw.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hiqgwns6n.wl%tiwai@suse.de>
At Mon, 10 Aug 2009 07:39:28 +0200,
I wrote:
>
> At Mon, 10 Aug 2009 02:02:06 +0300,
> Ozan Çağlayan wrote:
> >
> > Takashi Iwai wrote:
> > > At Sun, 09 Aug 2009 15:10:31 +0300,
> > >
> > >
> > > Could you load the module with probe_only=1 option and give
> > > alsa-info.sh output (or at least codec#* proc file)?
> > >
> >
> > Ok, will provide that info too. BTW,
> >
> > CPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 21 (level, low) -> IRQ 21
> > PCI: Setting latency timer of device 0000:00:1b.0 to 64
> > ** codec:0xf5846800
> > ** spec->dmux_nids:0x00000000
> > BUG: unable to handle kernel NULL pointer dereference at 00000000
> > IP: [<f8c7b4d5>] :snd_hda_codec_idt:stac92xx_init+0x29b/0x520
> > *pde = 00000000
> > Oops: 0000 [#1] SMP
> >
> >
> > spec->dmux_nids is NULL. Found the following commit:
>
> Good catch. How about the patch below?
Doh, sorry a totally broken patch. The fixed one is below.
I could reproduce the bug with the emulator, and this patch fixes the
issue. Updated sound GIT tree and snapshot now.
thanks,
Takashi
---
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a75d6a0..a695558 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -3701,7 +3701,7 @@ static int set_mic_route(struct hda_codec *codec,
if (i < 0)
return -1;
mic->mux_idx = i;
- } else {
+ } else if (spec->dmux_nids) {
/* digital pin */
mic->mux_idx = 0;
i = get_connection_index(codec, spec->dmux_nids[0], pin);
@@ -4404,7 +4404,8 @@ static int stac92xx_init(struct hda_codec *codec)
}
if (spec->auto_mic) {
/* initialize connection to analog input */
- snd_hda_codec_write_cache(codec, spec->dmux_nids[0], 0,
+ if (spec->dmux_nids)
+ snd_hda_codec_write_cache(codec, spec->dmux_nids[0], 0,
AC_VERB_SET_CONNECT_SEL, 0);
if (enable_pin_detect(codec, spec->ext_mic.pin, STAC_MIC_EVENT))
stac_issue_unsol_event(codec, spec->ext_mic.pin);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2009-08-10 5:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 19:51 [BUG] NULL pointer dereference in patch_sigmatel.c Ozan Çağlayan
2009-07-17 9:33 ` Takashi Iwai
2009-07-17 9:45 ` Takashi Iwai
2009-08-06 11:38 ` Ozan Çağlayan
2009-08-06 13:41 ` Ozan Çağlayan
2009-08-06 14:13 ` Takashi Iwai
2009-08-07 9:33 ` Ozan Çağlayan
2009-08-07 9:43 ` James Courtier-Dutton
2009-08-07 9:56 ` Takashi Iwai
2009-08-07 10:21 ` James Courtier-Dutton
2009-08-07 10:36 ` Ozan Çağlayan
2009-08-07 10:49 ` Takashi Iwai
2009-08-07 13:39 ` Ozan Çağlayan
2009-08-07 13:39 ` Takashi Iwai
2009-08-09 12:10 ` Ozan Çağlayan
2009-08-09 18:01 ` Takashi Iwai
2009-08-09 23:02 ` Ozan Çağlayan
2009-08-10 5:39 ` Takashi Iwai
2009-08-10 5:48 ` Takashi Iwai [this message]
2009-08-10 7:01 ` Ozan Çağlayan
2009-08-10 7:41 ` Takashi Iwai
2009-07-17 9:53 ` Ozan Çağlayan
2009-07-17 10:01 ` Takashi Iwai
2009-07-17 10:35 ` Ozan Çağlayan
2009-07-17 10:41 ` Takashi Iwai
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=s5hhbwgnrqw.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=ozan@pardus.org.tr \
/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