Commit fb9d78aca709b7a6389c79d6211fb384c69bb79f

Authored by Linus Torvalds

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

Showing 1 changed file Side-by-side Diff

drivers/char/apm-emulation.c
... ... @@ -301,7 +301,7 @@
301 301 * anything critical, chill a bit on each iteration.
302 302 */
303 303 while (wait_event_freezable(apm_suspend_waitqueue,
304   - as->suspend_state == SUSPEND_DONE))
  304 + as->suspend_state != SUSPEND_ACKED))
305 305 msleep(10);
306 306 break;
307 307 case SUSPEND_ACKTO: