diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-08-27 16:45:28 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-10-04 07:16:31 +0200 |
commit | a0978e8039f1b1bfb9fbc68f682b14313bb4f9ad (patch) | |
tree | 1c255087a112e82598000df49d13e25a5c61b9e9 | |
parent | bb690c9e2702e49af3be2fb6f03d9b60e0afcab7 (diff) | |
download | op-kernel-dev-a0978e8039f1b1bfb9fbc68f682b14313bb4f9ad.zip op-kernel-dev-a0978e8039f1b1bfb9fbc68f682b14313bb4f9ad.tar.gz |
ALSA: firewire-speakers: fix locking
There is a lock inversion between fwspk->mutex and pcm->open_mutex
reported by lockdep when fwspk_hw_free is called.
Fixed by copying the fix from the same former issue in the isight
sound driver (commit f3f7c1837f6bcae3601fc535b339426868bf1549
"ALSA: isight: fix locking").
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/firewire/speakers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c index 3fc257d..cbe6bb9 100644 --- a/sound/firewire/speakers.c +++ b/sound/firewire/speakers.c @@ -778,9 +778,10 @@ static int __devexit fwspk_remove(struct device *dev) { struct fwspk *fwspk = dev_get_drvdata(dev); - mutex_lock(&fwspk->mutex); amdtp_out_stream_pcm_abort(&fwspk->stream); snd_card_disconnect(fwspk->card); + + mutex_lock(&fwspk->mutex); fwspk_stop_stream(fwspk); mutex_unlock(&fwspk->mutex); @@ -796,8 +797,8 @@ static void fwspk_bus_reset(struct fw_unit *unit) fcp_bus_reset(fwspk->unit); if (cmp_connection_update(&fwspk->connection) < 0) { - mutex_lock(&fwspk->mutex); amdtp_out_stream_pcm_abort(&fwspk->stream); + mutex_lock(&fwspk->mutex); fwspk_stop_stream(fwspk); mutex_unlock(&fwspk->mutex); return; |