ALSA: PCM: Fix some races at disconnection
authorTakashi Iwai <tiwai@suse.de>
Fri, 12 Oct 2012 13:07:34 +0000 (15:07 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:46:48 +0000 (16:46 +0000)
commit700949d473671e3b20434d5a4cde71a04db88787
treed3a4bfdd514cc1e887ab309f690e94addd5868f5
parente2f0e7307a7fd8b30bff60c4fb17ce23fc0d773b
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: Ben Hutchings <ben@decadent.org.uk>
sound/core/pcm.c
sound/core/pcm_native.c