aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2014-07-17 03:53:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 21:38:36 -0400
commit3e37ebb7183f0c4eb92a88c60657ac319c01b3e9 (patch)
treea8f3c0391cc8c756063cccbca4086c17f9e194fa /drivers/misc/mei
parentce05b68692f0e366384de96ddd07821c7bf364be (diff)
mei: reset client connection state on timeout
On connection timeout we leave the connecting client in connecting state. Since a new connection is stalled till previous connection is completed in this case no new connection is possible till the user space does release the file handle. Therefore on timeout we move the client to disconnected state. Cc: stable@vger.kernel.org # 3.15+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r--drivers/misc/mei/client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 59d20c599b16..9f8ab28bcb60 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -616,6 +616,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)
616 mutex_lock(&dev->device_lock); 616 mutex_lock(&dev->device_lock);
617 617
618 if (cl->state != MEI_FILE_CONNECTED) { 618 if (cl->state != MEI_FILE_CONNECTED) {
619 cl->state = MEI_FILE_DISCONNECTED;
619 /* something went really wrong */ 620 /* something went really wrong */
620 if (!cl->status) 621 if (!cl->status)
621 cl->status = -EFAULT; 622 cl->status = -EFAULT;