All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ASoC: pcm: Sync delayed work before releasing resources
Date: Tue, 26 Sep 2017 00:39:14 +0000	[thread overview]
Message-ID: <87r2uub8rg.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20170825100407.5640-1-tiwai@suse.de>


Hi Mark

> When ASoC driver is unbound dynamically during its operation (i.e. a
> kind of hot-unplug), we may hit Oops due to the resource access after
> the release by a delayed work, something like:
> 
>   Unable to handle kernel paging request at virtual address dead000000000220
>   ....
>   PC is at soc_dapm_dai_stream_event.isra.14+0x20/0xd0
>   LR is at snd_soc_dapm_stream_event+0x74/0xa8
>   ....
>   [<ffff000008715610>] soc_dapm_dai_stream_event.isra.14+0x20/0xd0
>   [<ffff00000871989c>] snd_soc_dapm_stream_event+0x74/0xa8
>   [<ffff00000871b23c>] close_delayed_work+0x3c/0x50
>   [<ffff0000080bbd6c>] process_one_work+0x1ac/0x318
>   [<ffff0000080bbf20>] worker_thread+0x48/0x420
>   [<ffff0000080c201c>] kthread+0xfc/0x128
>   [<ffff0000080842f0>] ret_from_fork+0x10/0x18
> 
> For fixing the race, this patch adds a sync-point in pcm private_free
> callback to finish the delayed work before actually releasing the
> resources.
> 
> Reported-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
> Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---

This patch solved my issue, can you consider this ?

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2017-09-26  0:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 10:04 [PATCH] ASoC: pcm: Sync delayed work before releasing resources Takashi Iwai
2017-09-26  0:39 ` Kuninori Morimoto [this message]
2017-09-26 16:13   ` Mark Brown
2017-09-27  0:46     ` Kuninori Morimoto
2017-09-27 17:10 ` Applied "ASoC: pcm: Sync delayed work before releasing resources" to the asoc tree Mark Brown

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=87r2uub8rg.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /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.