diff options
author | Borislav Petkov <bbpetkov@yahoo.de> | 2007-10-22 11:11:09 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-23 02:07:55 -0400 |
commit | 7507e8da2f21476007501f04d8bce2b7d0cb3971 (patch) | |
tree | 97dfb3efdfda3ee3c9402e52191b722c186e83e7 /sound/core | |
parent | 31127f2eb945f092010a457c65260b0e19471cc5 (diff) |
[ALSA] sound/core/control.c: hard-irq-safe -> hard-irq-unsafe lock warning
The lock grabbed in snd_ctl_empty_read_queue() is hardirq-unsafe but we hold
an hardirq-safe one already, so make the &ctl->read_lock also hard-irq-safe.
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/control.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 4c3aa8e10378..df0774c76f6f 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -93,15 +93,16 @@ static int snd_ctl_open(struct inode *inode, struct file *file) | |||
93 | 93 | ||
94 | static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl) | 94 | static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl) |
95 | { | 95 | { |
96 | unsigned long flags; | ||
96 | struct snd_kctl_event *cread; | 97 | struct snd_kctl_event *cread; |
97 | 98 | ||
98 | spin_lock(&ctl->read_lock); | 99 | spin_lock_irqsave(&ctl->read_lock, flags); |
99 | while (!list_empty(&ctl->events)) { | 100 | while (!list_empty(&ctl->events)) { |
100 | cread = snd_kctl_event(ctl->events.next); | 101 | cread = snd_kctl_event(ctl->events.next); |
101 | list_del(&cread->list); | 102 | list_del(&cread->list); |
102 | kfree(cread); | 103 | kfree(cread); |
103 | } | 104 | } |
104 | spin_unlock(&ctl->read_lock); | 105 | spin_unlock_irqrestore(&ctl->read_lock, flags); |
105 | } | 106 | } |
106 | 107 | ||
107 | static int snd_ctl_release(struct inode *inode, struct file *file) | 108 | static int snd_ctl_release(struct inode *inode, struct file *file) |