Received: by 10.192.165.148 with SMTP id m20csp4159208imm; Mon, 30 Apr 2018 12:54:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphmDBMuI1jRVWZMmiyRFXVwPlzVL7J5F9T6IUnIVVzGnTdBbfltPNO0VDpDo/APWc6d9D7 X-Received: by 10.98.17.220 with SMTP id 89mr13197455pfr.18.1525118082803; Mon, 30 Apr 2018 12:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118082; cv=none; d=google.com; s=arc-20160816; b=nk5hLBHZZC+7JjndMTw9GyBdD7UkG1V/flG0maZDz12Oj/BQ2kyWMoqcDrVdewqjBd JM2NgUH1SSpwUiAI1ubWPq8p0p+rUKF7fyXS50XyDvK/WY9cM5K4ZiwStdTreU7s7xIK +A6AQqYvCOm7qP0KDyP7nHaeo6vv5Rj6tEUiAUZ5lM2LgPMdUqXoktk+eUrUCa/YCGRU b0/K5igjy2elousRJ8WeC203hcH9vHttCZxXFVUlNIwADekQaxgLRnR+cwGQ2up64fLv fn/EsJsu+TTeNSBTBkavOdpE16GIWpB2HikTXX9FR8yGSgD6TmtvcxbVD9OE4q3YKHWl IJ/Q== 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=taovzLPED0zSuNpqtoMF4KytF0KiM1kNQSXzOfgiwH0=; b=PlzOp7TuYUne74C18rAxwadhD3XChFA8Wd4K2QA1kA3e73dt/7SYPEGq151LMwwl4q WiUTnwmq/OEXvglREcSuufmda/OYYMqR5ptXxPKsC7qoNCI6FuYcJyW6gafPkUQoiki2 KN4AYoG6MQ9/p74+fggh5MsWm/wkPw+5GczwPRfmyOSO/Z5QfZyxhKG0xutXN4UtmgaN H3P3pdnqngoTr06swBZNh7rw8dMR2edJXg43V9eEHYSrX7v0ADYuYEytqREHButr0cki 045sRYCzuBdszsLB0ZSYrkX222sz4tyamksiadzF71UIwEnXynab1nY0fvUwI0V8lBM2 4zrw== 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 t8si8046973pfl.344.2018.04.30.12.54.28; Mon, 30 Apr 2018 12:54:42 -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 S1756115AbeD3T15 (ORCPT + 99 others); Mon, 30 Apr 2018 15:27:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:34998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756103AbeD3T1y (ORCPT ); Mon, 30 Apr 2018 15:27:54 -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 8588922DCC; Mon, 30 Apr 2018 19:27:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8588922DCC 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.16 011/113] usbip: vhci_hcd: Fix usb device and sockfd leaks Date: Mon, 30 Apr 2018 12:23:42 -0700 Message-Id: <20180430184015.551728492@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184015.043892819@linuxfoundation.org> References: <20180430184015.043892819@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.16-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 @@ -243,7 +243,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)