Received: by 10.192.165.148 with SMTP id m20csp4195549imm; Mon, 30 Apr 2018 13:37:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpMfMuSAkX56OzBXWrgY25U15I+92Ios/Q8DJF6l+jo6A+/GqEGlcyMUwPNnP/PJuqiE0Aa X-Received: by 2002:a17:902:2468:: with SMTP id m37-v6mr13969845plg.388.1525120661863; Mon, 30 Apr 2018 13:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525120661; cv=none; d=google.com; s=arc-20160816; b=dWOW+gFtZdN01f2oxkG1gwbfy/WgrbgplV7GleRGYjt3p5/JiE7wmOrk5chF0FEzir rAeXCeqWLXMzrawEP6RHXZqliffCM7SYkUFhjG/MgBrTmNlMEkQhqn9ZJgH0P928eDXG QhFcuxFgx9DslPakrMglNlSoqM0wVSZaZ62Vyl0X4YmazG9dwPKLukRqhsC8IwBwuEfv sIJF6qN2FZuzv775PxpJ41AlDz2RTtDWjyh0PyE95QBWflwMCPX6wq+3PVLkI33sPsfG /zFkIKjlwRWUb5TeqkhpHh43ji013hgAJVwzLPON4Jq9Wv62KC9vqNEENsnSwO/dJ04L SBKA== 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=YFVMEA8QwcHlambRNaKr0uqghY1VsldL6giY7Q9wnzk=; b=dppozSHInA1mnqVk6yR73oOigSUf9REwyEuIPCHn/OJO9tCXh0iI9KW+1fexNjJI3u 4nZnSr3av28c5uXV773CH+G29edRvlLrV8cDUU7ignjWbt7hBZR1TcP/cbT2wsJfzsBl OAnT6cpqEvvZLZRfesC8d12/RPIa4f07vRT08tYsy9QtdNxciuX7+LJDKhkEu8UVSRxr /YbbNFpJsv4V6uK4hj8wDsUb07wPNZ27lM7IJz1J4cPwim18juPGHmJzYQW4yH+cfbzd JFRHLszEVluSjSulw6leI/1c4pFIpTh1zrPf/RhbM37aAxmHZtlSBxbzRC8X4Qn4bi0O ZBlQ== 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 a81si7603019pfj.300.2018.04.30.13.37.27; Mon, 30 Apr 2018 13:37:41 -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 S1755423AbeD3TZy (ORCPT + 99 others); Mon, 30 Apr 2018 15:25:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:58748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755399AbeD3TZv (ORCPT ); Mon, 30 Apr 2018 15:25:51 -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 1C8C122DBE; Mon, 30 Apr 2018 19:25:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C8C122DBE 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.4 06/44] usbip: vhci_hcd: Fix usb device and sockfd leaks Date: Mon, 30 Apr 2018 12:24:17 -0700 Message-Id: <20180430190946.589260457@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430190946.093694747@linuxfoundation.org> References: <20180430190946.093694747@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.4-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 @@ -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)