Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94256dd680f837dc14dd7d1377c5326fb3362721
Commit:     94256dd680f837dc14dd7d1377c5326fb3362721
Parent:     07a0cfec30848319cc86f21cce0d2efeca593e1a
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 16 22:53:25 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Apr 17 16:36:27 2007 -0700

    drivers/macintosh/smu.c: fix locking snafu
    
    It got its lock and unlock backwards.
    
    Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8334
    
    (obviously, this code could be using plain old spin_lock_irq(), too)
    
    Cc: <[EMAIL PROTECTED]>
    Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: Paul Mackerras <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/macintosh/smu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 3096836..c9f3dc4 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file 
*file)
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        if (pp->cmd.status != 1)
                                break;
-                       spin_lock_irqsave(&pp->lock, flags);
-                       schedule();
                        spin_unlock_irqrestore(&pp->lock, flags);
+                       schedule();
+                       spin_lock_irqsave(&pp->lock, flags);
                }
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&pp->wait, &wait);
-
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