aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-04-17 01:53:25 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-17 19:36:27 -0400
commit94256dd680f837dc14dd7d1377c5326fb3362721 (patch)
tree5f64a661c86e8d0c7f656952beb6ae58d24bbcbe /drivers/macintosh/smu.c
parent07a0cfec30848319cc86f21cce0d2efeca593e1a (diff)
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/smu.c')
-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)
1259 set_current_state(TASK_UNINTERRUPTIBLE); 1259 set_current_state(TASK_UNINTERRUPTIBLE);
1260 if (pp->cmd.status != 1) 1260 if (pp->cmd.status != 1)
1261 break; 1261 break;
1262 spin_lock_irqsave(&pp->lock, flags);
1263 schedule();
1264 spin_unlock_irqrestore(&pp->lock, flags); 1262 spin_unlock_irqrestore(&pp->lock, flags);
1263 schedule();
1264 spin_lock_irqsave(&pp->lock, flags);
1265 } 1265 }
1266 set_current_state(TASK_RUNNING); 1266 set_current_state(TASK_RUNNING);
1267 remove_wait_queue(&pp->wait, &wait); 1267 remove_wait_queue(&pp->wait, &wait);