mei: reset client connection state on timeout
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 17 Jul 2014 07:53:34 +0000 (10:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 01:38:36 +0000 (18:38 -0700)
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>
drivers/misc/mei/client.c

index 59d20c599b16570aad2e0b9da61718fab05816b4..9f8ab28bcb60d16565c14052788045a5f7e01488 100644 (file)
@@ -616,6 +616,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)
        mutex_lock(&dev->device_lock);
 
        if (cl->state != MEI_FILE_CONNECTED) {
+               cl->state = MEI_FILE_DISCONNECTED;
                /* something went really wrong */
                if (!cl->status)
                        cl->status = -EFAULT;
This page took 0.025061 seconds and 5 git commands to generate.