浏览代码

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
Linus Torvalds 13 年之前
父节点
当前提交
fb9d78aca7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/char/apm-emulation.c

+ 1 - 1
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: