Received: by 10.192.165.148 with SMTP id m20csp4180795imm; Mon, 30 Apr 2018 13:19:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrAz2+cwvEeTmni6Ln7S51ia1Q71IA7Oac9bPXaljFhar3tFyJOdn3as47KSFQi+6DQdOF6 X-Received: by 2002:a17:902:ab8d:: with SMTP id f13-v6mr13069572plr.81.1525119578303; Mon, 30 Apr 2018 13:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525119578; cv=none; d=google.com; s=arc-20160816; b=yCVWgMpMNIMfXU/1WwXi/JkSmI5o+mTZlllEvk+Z1SQ0p7+fPxE/Jx3jaUFnMfLKbn gSJ4herX6BaC8701ilUUHeRak9oei/9mo9XEb9Z5I6XJxyDXMB3qBtkFtLesTyZ8y1Ue e7ee4z/y9T9NtF68Sf7qvrmyGI/x8vngHKG+0gpV+uMge+KKC3PIzvtKDBVNwp40eTYV gKSlySgSjfB/kamq6wCWZ0KRspIs7WENm3pHuWpRGFHgfmRZP/PJVt1FkcHlkA3Zkw5n R0rNbw7s3XdGD+bR9FMbIMudX/oKQ9CiiDVfaq2G74MvWsSF6WTJqjDkn9QOU4FstPwz vE5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=UW+J9pmo31+IUhcBI11lFtF+iDBuOQcsLZsbeXzGvGA=; b=xyABjRmZPhMW+vTsXQ9sirGA5DWeHP6BUYUCZsYjwdIWkyQX1I2dar33guDb9t+y6Y ry41lo8x62UdiBncRzoxmaoEtxia02YWfvLqt0lsh/I0OeIl8DjB5SKi9a9Bg+Je6K3c mE25bdLzqYNyGSbhfYO+I9DKYZDbWryXEGnj54BMxjKAMainB46KJ10N7oku9D48+EdX MjJPC7mWp7FXpqGh0tlxAPGr+zxt8LcWFBD0jIR1/+aLoGMvi+iLioH39sXiaraWLaID 44s9yHySHLtbD3Q9M180wVYqTv2U4VZv1E3PkgWvKLY03kXQP2e4++LdjsJmJkK7abR7 bYig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z64-v6si1974711pgb.471.2018.04.30.13.19.24; Mon, 30 Apr 2018 13:19:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755695AbeD3USB (ORCPT + 99 others); Mon, 30 Apr 2018 16:18:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:32924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755828AbeD3T04 (ORCPT ); Mon, 30 Apr 2018 15:26:56 -0400 Received: from localhost (unknown [104.132.1.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AACCE22DBF; Mon, 30 Apr 2018 19:26:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AACCE22DBF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan Subject: [PATCH 4.14 11/91] usbip: vhci_hcd: Fix usb device and sockfd leaks Date: Mon, 30 Apr 2018 12:23:53 -0700 Message-Id: <20180430184004.810934156@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184004.216234025@linuxfoundation.org> References: <20180430184004.216234025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shuah Khan commit 9020a7efe537856eb3e826ebebdf38a5d07a7857 upstream. 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 Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usbip/usbip_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/usbip/usbip_common.h +++ b/drivers/usb/usbip/usbip_common.h @@ -257,7 +257,7 @@ enum usbip_side { #define VUDC_EVENT_ERROR_USB (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE) #define VUDC_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)