Received: by 10.192.165.148 with SMTP id m20csp4184034imm; Mon, 30 Apr 2018 13:23:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrB+/MOa53UTXi289/6Nal+OMGx+WhYcyuC8LBgWBtHt//0vwslX203Ffp/XBNBIDHKVkZO X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr13877187plb.184.1525119833455; Mon, 30 Apr 2018 13:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525119833; cv=none; d=google.com; s=arc-20160816; b=mSXv/8qni7KS7p7b/e6Qqqbeu9MoqgwHuP7rEXEo3cp3L6l9yo6M6GCvFEhv05dJC7 pwwv9a/T0f0ptyZGgD88zsGnb1X4Z/wGENHGA5m/N5FM7pd/aZUYPURuh+Fo4fPYd77W L4cBQN6Mol5rbTTQuHIT4+/mUd2ylhlyrDYPA/dG2SEnCGRAm7Dv+D9PqMkcLibBLn2r SPunIgFcBknU0m3k6dVXOIYz0LH1y2QSY2kmtuwhMhKea8uuA9MKFMNNhknDxo/UwlF9 O9JwUZncQsqEVkaE9k1JInAVtWxNxzWq/Uh28IL9wUIFgu0xxtr/NYmYNUAjARYS46yx C+MQ== 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=ufvHTd9ih/Eat2hB5m1XXSXen6t6xv9+zeCFcWq527k=; b=JPybg4KqfDnEBm4U/nJH+oBmNzpfBkBuHYnXGOm1l6xU0FsuyJLvejQWtneFSlJjmh plSih/DcwTlj7RL+gZs7IhX7ID7U/+7eY6+3z7ZMINRKdjiLz9N0Y9rAJoEkPOs1tvGp tg+0+yKSSuEZmim/lZg0hXjiG7QuSi2mT4IyJicB9zMVLGrGmpYw7naKtlwz0ED+5E3S jHJRMINzFd3qh7f7JpAyCc3QOHI7pNT2g9GTMzhiT1vFSOx0vQ26Xu2HvTg/NC71MQcI 08DhdREuPizLG9v0BWUd+ggNPvIN2yAD11JNFllDn4mSfHbQvl+FTgvQPIep9GeJVU3T Hycg== 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 e187-v6si6752184pgc.127.2018.04.30.13.23.39; Mon, 30 Apr 2018 13:23:53 -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 S1755922AbeD3UWR (ORCPT + 99 others); Mon, 30 Apr 2018 16:22:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:60536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755736AbeD3T0j (ORCPT ); Mon, 30 Apr 2018 15:26:39 -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 7062122DBF; Mon, 30 Apr 2018 19:26:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7062122DBF 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.9 10/61] usbip: vhci_hcd: Fix usb device and sockfd leaks Date: Mon, 30 Apr 2018 12:24:13 -0700 Message-Id: <20180430183952.158517841@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430183951.312721450@linuxfoundation.org> References: <20180430183951.312721450@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.9-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 @@ -258,7 +258,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)