Commit 94256dd6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 07a0cfec
...@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file) ...@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file)
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
if (pp->cmd.status != 1) if (pp->cmd.status != 1)
break; break;
spin_lock_irqsave(&pp->lock, flags);
schedule();
spin_unlock_irqrestore(&pp->lock, flags); spin_unlock_irqrestore(&pp->lock, flags);
schedule();
spin_lock_irqsave(&pp->lock, flags);
} }
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
remove_wait_queue(&pp->wait, &wait); remove_wait_queue(&pp->wait, &wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment