tty: smux_ctl: Do not set POLLERR if signal received

During the userspace freeze process, a fake signal is sent to userspace
applications.  In the case of SMUX CTL, the smux_ctl_poll() will set the
POLLERR flag if a signal is received.  This incorrectly unblocks the
userspace application that called poll() and the userspace application
will grab a wakelock before doing additional processing which aborts the
freeze process.

Change smux_ctl_poll() to not set POLLERR if a signal is received.

CRs-Fixed: 402651
Change-Id: I3d18552ceff769d302d1536cf5b9345f3aad767b
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
This commit is contained in:
Eric Holmberg
2012-09-21 12:57:00 -06:00
parent 769984218f
commit 3cbcfa3d79
+4 -3
View File
@@ -770,12 +770,13 @@ static unsigned int smux_ctl_poll(struct file *file, poll_table *wait)
poll_wait(file, &devp->read_wait_queue, wait);
readable = smux_ctl_readable(devp->id);
if (readable < 0) {
if (readable > 0) {
mask = POLLIN | POLLRDNORM;
} else if ((readable < 0) && (readable != -ERESTARTSYS)) {
/* error case (non-signal) received */
pr_err(SMUX_CTL_MODULE_NAME ": %s err%d during poll for smuxctl%d\n",
__func__, readable, devp->id);
mask = POLLERR;
} else if (readable) {
mask = POLLIN | POLLRDNORM;
}
return mask;