diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-13 04:12:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-13 04:12:59 -0400 |
commit | 635c265f32d8a3f73402813d6a8dd47f2a363df5 (patch) | |
tree | f86815481d55d7b844468e4cca92211daea800e2 /sound/pci/ctxfi/ctatc.h | |
parent | a5990dc5b96f537618b0f057c8723a6a0b0cdc74 (diff) |
ALSA: ctxfi - Replace atc lock to mutex
The spinlock in atc can cause a sleep in lock:
Kernel failure message 1:
BUG: sleeping function called from invalid context at mm/slub.c:1599
in_atomic(): 0, irqs_disabled(): 1, pid: 2537, name: gstreamer-prope
Pid: 2537, comm: gstreamer-prope Tainted: P
2.6.29.4-167.fc11.x86_64 #1
Call Trace:
[<ffffffff8103ff0f>] __might_sleep+0x10b/0x110
[<ffffffff810cd734>] __kmalloc+0x73/0x130
[<ffffffffa0b4b142>] ? daio_rsc_init+0xaa/0x125 [snd_ctxfi]
[<ffffffffa0b4b212>] dao_rsc_init+0x55/0x1c0 [snd_ctxfi]
[<ffffffffa0b4b3d2>] dao_rsc_reinit+0x55/0x5d [snd_ctxfi]
[<ffffffff813abd6c>] ? _spin_lock_irqsave+0x32/0x3b
[<ffffffffa0b454fe>] atc_spdif_out_passthru+0x92/0x136 [snd_ctxfi]
...
Since the lock path is no critical path, it can be gracefully
replaced with a mutex.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/ctatc.h')
-rw-r--r-- | sound/pci/ctxfi/ctatc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ctxfi/ctatc.h b/sound/pci/ctxfi/ctatc.h index a03347232e84..9fe620ea5f3f 100644 --- a/sound/pci/ctxfi/ctatc.h +++ b/sound/pci/ctxfi/ctatc.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define CTATC_H | 19 | #define CTATC_H |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/spinlock_types.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <sound/core.h> | 25 | #include <sound/core.h> |
@@ -90,7 +90,7 @@ struct ct_atc { | |||
90 | void (*unmap_audio_buffer)(struct ct_atc *atc, struct ct_atc_pcm *apcm); | 90 | void (*unmap_audio_buffer)(struct ct_atc *atc, struct ct_atc_pcm *apcm); |
91 | unsigned long (*get_ptp_phys)(struct ct_atc *atc, int index); | 91 | unsigned long (*get_ptp_phys)(struct ct_atc *atc, int index); |
92 | 92 | ||
93 | spinlock_t atc_lock; | 93 | struct mutex atc_mutex; |
94 | 94 | ||
95 | int (*pcm_playback_prepare)(struct ct_atc *atc, | 95 | int (*pcm_playback_prepare)(struct ct_atc *atc, |
96 | struct ct_atc_pcm *apcm); | 96 | struct ct_atc_pcm *apcm); |