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:18:50 +0000 (13:18 -0800)
commite3c3705cfd328885a6fc8a265c5949fbd243a2f7
tree7e698c08bab6125f2385071f904d4d645f4075df
parent2553761e062594503006a7fad70ec0c25eadeb30
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