Re: [PATCH] ASoC: pcm: Sync delayed work before releasing resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
> ---

This patch solved my issue, can you consider this ?

Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux