summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-06 02:34:30 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-06 02:34:30 +0200
commitfb9d78aca709b7a6389c79d6211fb384c69bb79f (patch)
treec9895e2b9a2b8ab30b1fbd8b0764a60fdcf3f4ff /drivers/char
parentMerge branch 'akpm' (Andrew's patch-bomb) (diff)
parentAPM: fix deadlock in APM_IOC_SUSPEND ioctl (diff)
downloadlinux-fb9d78aca709b7a6389c79d6211fb384c69bb79f.tar.xz
linux-fb9d78aca709b7a6389c79d6211fb384c69bb79f.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm
Pull an APM fix from Jiri Kosina: "One deadlock/race fix from Niel that got introduced when we were moving away from freezer_*_count() to wait_event_freezable()." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm: APM: fix deadlock in APM_IOC_SUSPEND ioctl
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/apm-emulation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c
index 57501ca9204b..46118f845948 100644
--- a/drivers/char/apm-emulation.c
+++ b/drivers/char/apm-emulation.c
@@ -301,7 +301,7 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg)
* anything critical, chill a bit on each iteration.
*/
while (wait_event_freezable(apm_suspend_waitqueue,
- as->suspend_state == SUSPEND_DONE))
+ as->suspend_state != SUSPEND_ACKED))
msleep(10);
break;
case SUSPEND_ACKTO: