Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7507e8da2f21476007501f04d8bce2b7d0cb3971
Commit:     7507e8da2f21476007501f04d8bce2b7d0cb3971
Parent:     31127f2eb945f092010a457c65260b0e19471cc5
Author:     Borislav Petkov <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 17:11:09 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 23 08:07:55 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 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 4c3aa8e..df0774c 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)
 
 static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl)
 {
+       unsigned long flags;
        struct snd_kctl_event *cread;
        
-       spin_lock(&ctl->read_lock);
+       spin_lock_irqsave(&ctl->read_lock, flags);
        while (!list_empty(&ctl->events)) {
                cread = snd_kctl_event(ctl->events.next);
                list_del(&cread->list);
                kfree(cread);
        }
-       spin_unlock(&ctl->read_lock);
+       spin_unlock_irqrestore(&ctl->read_lock, flags);
 }
 
 static int snd_ctl_release(struct inode *inode, struct file *file)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to