ALSA: PCM: Fix some races at disconnection
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Nov 2012 11:39:51 +0000 (12:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 21:14:22 +0000 (13:14 -0800)
commit61bc2855cf2e28f7ef3928c04453daa07dfffd9b
tree279016d1e07b24d3681285315cef2f3acf0d8ce7
parentec1f5bf6b3a9f42284371d41a7c998c05c49abcb
ALSA: PCM: Fix some races at disconnection

commit 9b0573c07f278e9888c352aa9724035c75784ea0 upstream.

Fix races at PCM disconnection:
- while a PCM device is being opened or closed
- while the PCM state is being changed without lock in prepare,
  hw_params, hw_free ops

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/pcm.c
sound/core/pcm_native.c