From: Takashi Iwai <tiwai@suse.de>
To: "Yang, Libin" <libin.yang@intel.com>
Cc: "Lin, Mengdong" <mengdong.lin@intel.com>,
"libin.yang@linux.intel.com" <libin.yang@linux.intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ALSA: hda - hdmi get jack from hda_jack_tbl when not dyn_pcm_assign
Date: Thu, 18 Feb 2016 08:54:32 +0100 [thread overview]
Message-ID: <s5hk2m2313b.wl-tiwai@suse.de> (raw)
In-Reply-To: <96A12704CE18D347B625EE2D4A099D1904667A3F@shsmsx102.ccr.corp.intel.com>
On Thu, 18 Feb 2016 07:16:29 +0100,
Yang, Libin wrote:
>
> Hi Takashi,
>
> I submitted the patch which can fix a regression involved from my
> jack patch:
> commit 25e4abb33df3aafa7d1efba8f82f9178268efab1
> Author: Libin Yang <libin.yang@linux.intel.com>
> Date: Tue Jan 12 11:13:27 2016 +0800
>
> ALSA: hda - hdmi jack created based on pcm
>
> I'm sorry for the inconvenience.
>
> As the dyn pcm patches are merged into the for-next branch, I'm asking
> our QA to do the full test on it. They said they can start the stress test
> from next week.
One concern is the report from CI test about the crash at unloading
the module. I couldn't reproduce it locally. Could you take a look?
Takashi
>
> Regards,
> Libin
>
>
> > -----Original Message-----
> > From: libin.yang@linux.intel.com [mailto:libin.yang@linux.intel.com]
> > Sent: Thursday, February 18, 2016 1:25 PM
> > To: alsa-devel@alsa-project.org; tiwai@suse.de
> > Cc: Lin, Mengdong; Yang, Libin; Libin Yang
> > Subject: [PATCH] ALSA: hda - hdmi get jack from hda_jack_tbl when not
> > dyn_pcm_assign
> >
> > From: Libin Yang <libin.yang@linux.intel.com>
> >
> > On Intel platform, if !dyn_pcm_assign, spec->pcm_rec[].jack is not
> > NULL even after snd_hda_jack_tbl_clear() is called to free snd_jack.
> > This may cause access invalid memory when calling snd_jack_report.
> >
> > Please see more detail from:
> > https://bugs.freedesktop.org/show_bug.cgi?id=94079
> >
> > Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> > ---
> > sound/pci/hda/patch_hdmi.c | 16 ++++++++++++++--
> > 1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> > index f4443b5..3b47101 100644
> > --- a/sound/pci/hda/patch_hdmi.c
> > +++ b/sound/pci/hda/patch_hdmi.c
> > @@ -1962,6 +1962,7 @@ static void sync_eld_via_acomp(struct
> > hda_codec *codec,
> > {
> > struct hdmi_spec *spec = codec->spec;
> > struct hdmi_eld *eld = &spec->temp_eld;
> > + struct hda_jack_tbl *jack_tbl;
> > struct snd_jack *jack = NULL;
> > int size;
> >
> > @@ -1989,10 +1990,21 @@ static void sync_eld_via_acomp(struct
> > hda_codec *codec,
> > /* pcm_idx >=0 before update_eld() means it is in monitor
> > * disconnected event. Jack must be fetched before update_eld()
> > */
> > - if (per_pin->pcm_idx >= 0)
> > + /* if !dyn_pcm_assign, get jack from hda_jack_tbl
> > + * in !dyn_pcm_assign case, spec->pcm_rec[].jack is not
> > + * NULL even after snd_hda_jack_tbl_clear() is called to
> > + * free snd_jack. This may cause access invalid memory
> > + * when calling snd_jack_report
> > + */
> > + if (per_pin->pcm_idx >= 0 && spec->dyn_pcm_assign)
> > jack = spec->pcm_rec[per_pin->pcm_idx].jack;
> > + else {
> > + jack_tbl = snd_hda_jack_tbl_get(codec, per_pin-
> > >pin_nid);
> > + if (jack_tbl)
> > + jack = jack_tbl->jack;
> > + }
> > update_eld(codec, per_pin, eld);
> > - if (jack == NULL && per_pin->pcm_idx >= 0)
> > + if (jack == NULL && per_pin->pcm_idx >= 0 && spec-
> > >dyn_pcm_assign)
> > jack = spec->pcm_rec[per_pin->pcm_idx].jack;
> > if (jack == NULL)
> > goto unlock;
> > --
> > 1.9.1
>
next prev parent reply other threads:[~2016-02-18 7:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 5:25 [PATCH] ALSA: hda - hdmi get jack from hda_jack_tbl when not dyn_pcm_assign libin.yang
2016-02-18 6:16 ` Yang, Libin
2016-02-18 7:54 ` Takashi Iwai [this message]
2016-02-18 8:06 ` Yang, Libin
2016-02-18 8:08 ` Takashi Iwai
2016-02-18 8:23 ` Yang, Libin
2016-02-18 9:03 ` Takashi Iwai
2016-02-18 7:53 ` Takashi Iwai
2016-02-18 8:02 ` Yang, Libin
2016-02-18 8:07 ` Takashi Iwai
2016-02-18 8:11 ` Yang, Libin
-- strict thread matches above, loose matches on Subject: below --
2016-02-19 7:42 libin.yang
2016-02-19 8:20 ` 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=s5hk2m2313b.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=libin.yang@intel.com \
--cc=libin.yang@linux.intel.com \
--cc=mengdong.lin@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.