aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorNeilBrown <[email protected]>2012-04-01 10:19:30 +0000
committerJiri Kosina <[email protected]>2012-04-03 01:42:36 +0000
commitf283d22713b0bdc147097c92c9b45855339cf1c8 (patch)
treefee788fb13479ebe013eae8c9a4b621d6ccd3057 /lib/mpi/mpi-cmp.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jik... (diff)
downloadkernel-f283d22713b0bdc147097c92c9b45855339cf1c8.tar.gz
kernel-f283d22713b0bdc147097c92c9b45855339cf1c8.zip
APM: fix deadlock in APM_IOC_SUSPEND ioctl
I found the Xorg server on my ARM device stuck in the 'msleep()' loop in apm_ioctl. I suspect it had attempted suspend immediately after resuming and lost a race. During that msleep(10);, a new suspend cycle must have started and changed ->suspend_state to SUSPEND_PENDING, so it was never seen to be SUSPEND_DONE and the loop could never exited. It would have moved on to SUSPEND_ACKTO but never been able to reach SUSPEND_DONE. So change the loop to only run while SUSPEND_ACKED rather than until SUSPEND_DONE. This is much safer. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions