summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorAndrew Morton2007-04-17 07:53:25 +0200
committerLinus Torvalds2007-04-18 01:36:27 +0200
commit94256dd680f837dc14dd7d1377c5326fb3362721 (patch)
tree5f64a661c86e8d0c7f656952beb6ae58d24bbcbe /drivers/macintosh
parentufs proper handling of zero link case (diff)
downloadkernel-qcow2-linux-94256dd680f837dc14dd7d1377c5326fb3362721.tar.gz
kernel-qcow2-linux-94256dd680f837dc14dd7d1377c5326fb3362721.tar.xz
kernel-qcow2-linux-94256dd680f837dc14dd7d1377c5326fb3362721.zip
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: <matthias.kaehlcke@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/smu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 3096836d8bd3..c9f3dc4fd3ee 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);