]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usbip: vhci_hcd: Fix usb device and sockfd leaks
authorShuah Khan <shuahkh@osg.samsung.com>
Mon, 2 Apr 2018 20:52:32 +0000 (14:52 -0600)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:37 +0000 (21:36 -0400)
[ Upstream commit 9020a7efe537856eb3e826ebebdf38a5d07a7857 ]

vhci_hcd fails to do reset to put usb device and sockfd in the
module remove/stop paths. Fix the leak.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/usb/usbip/usbip_common.h

index f875ccaa55f9ed3d832027e4f2a1c1c05598b98c..0fc5ace57c0e1e7dd561f5ed12c3bc22499bec15 100644 (file)
@@ -248,7 +248,7 @@ enum usbip_side {
 #define        SDEV_EVENT_ERROR_SUBMIT (USBIP_EH_SHUTDOWN | USBIP_EH_RESET)
 #define        SDEV_EVENT_ERROR_MALLOC (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE)
 
-#define        VDEV_EVENT_REMOVED      (USBIP_EH_SHUTDOWN | USBIP_EH_BYE)
+#define        VDEV_EVENT_REMOVED (USBIP_EH_SHUTDOWN | USBIP_EH_RESET | USBIP_EH_BYE)
 #define        VDEV_EVENT_DOWN         (USBIP_EH_SHUTDOWN | USBIP_EH_RESET)
 #define        VDEV_EVENT_ERROR_TCP    (USBIP_EH_SHUTDOWN | USBIP_EH_RESET)
 #define        VDEV_EVENT_ERROR_MALLOC (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE)