All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Raymond Yau <superquad.vortex2@gmail.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: snd_array_free - snd: bad kfree when HDA reconfig
Date: Thu, 15 Sep 2011 16:30:51 +0200	[thread overview]
Message-ID: <s5h62ktop2c.wl%tiwai@suse.de> (raw)
In-Reply-To: <CAN8ccibfeqqOJCm5mc6WPcy__vmb0fEV+prBxkFosr6wRjoHSg@mail.gmail.com>

At Thu, 15 Sep 2011 22:23:12 +0800,
Raymond Yau wrote:
> 
> 2011/9/14 Takashi Iwai <tiwai@suse.de>:
> >
> > Try the patch below in addition to the previous one.
> >
> >
> > thanks,
> >
> > Takashi
> >
> > ---
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] Add missing export of snd_hidden_ksize()
> >
> > Also fix the ifdef of krealloc() wrapper for some corner cases.
> >
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  acore/sound.inc   |    1 +
> >  include/adriver.h |    3 ++-
> >  2 files changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/acore/sound.inc b/acore/sound.inc
> > index a79755e..2e63c98 100644
> > --- a/acore/sound.inc
> > +++ b/acore/sound.inc
> > @@ -3,6 +3,7 @@
> >  EXPORT_SYMBOL(snd_hidden_kmalloc);
> >  EXPORT_SYMBOL(snd_hidden_kzalloc);
> >  EXPORT_SYMBOL(snd_hidden_kcalloc);
> > +EXPORT_SYMBOL(snd_hidden_ksize);
> >  EXPORT_SYMBOL(snd_hidden_kfree);
> >  EXPORT_SYMBOL(snd_hidden_kstrdup);
> >  EXPORT_SYMBOL(snd_hidden_kstrndup);
> > diff --git a/include/adriver.h b/include/adriver.h
> > index fe70442..848bc17 100644
> > --- a/include/adriver.h
> > +++ b/include/adriver.h
> > @@ -2002,7 +2002,8 @@ static inline bool flush_delayed_work_sync(struct delayed_work *dwork)
> >  #endif
> >
> >  /* krealloc() wrapper */
> > -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) || defined(CONFIG_SND_DEBUG_MEMORY)
> > +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) || \
> > +       (defined(CONFIG_SND_DEBUG_MEMORY) && !defined(SKIP_HIDDEN_MALLOCS))
> >  #include <linux/slab.h>
> >  static inline void *snd_compat_krealloc(const void *p, size_t new_size, gfp_t flags)
> >  {
> > --
> > 1.7.6.1
> >
> >
> 
> your patch fix the problem
> 
> BTW, there is some strange behaviour of the non-sticky pcm
> implementation on ad1988
> 
> Refer to commit 0e7adbe263f89ea2ef15b5af5e80a812b2a85025
> 
> Disable sticky PCM stream assignment for AD codecs
> 
> why hda_codec_cleanup_stream is called twice  and this also occur with
> capture and playback

Isn't it just the power-save?  The suspend calls
hda_cleanup_all_streams().

That is, the first call is the normal one, and it doesn't clean up the
stream actually because of stickiness.  The second call is the real
cleanup at power-saving.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2011-09-15 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02  7:16 snd_array_free - snd: bad kfree when HDA reconfig Raymond Yau
2011-09-12  7:46 ` Takashi Iwai
2011-09-14  0:04   ` Raymond Yau
2011-09-14  6:02     ` Takashi Iwai
2011-09-15 14:23       ` Raymond Yau
2011-09-15 14:30         ` Takashi Iwai [this message]

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=s5h62ktop2c.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=superquad.vortex2@gmail.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.