Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2002988imm; Thu, 24 May 2018 04:20:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrqChZSHRjFJS/PLvvUzpWAqkmUGBB7Zt2AogGQsV7ZMWwDaX1oz5DUp0o+k907k8YbPrac X-Received: by 2002:a62:4184:: with SMTP id g4-v6mr6848229pfd.51.1527160838076; Thu, 24 May 2018 04:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527160838; cv=none; d=google.com; s=arc-20160816; b=EasscWKzdmt/mqjLVz7yauAKzxL7iH9snyNl9uR88hHKg83iLQKrvlkIRacwiPDgcE MCpNdaG5eNXb+BwIHcrux0onGGppT24hG/Bg2cRFNWPFydCg96hOwb9cJOWtVEyvA7jB B7tmcdQ1cPvSZwmCqFPyMZbsgCwLpi4vUvxEfcR7BBoc4g8C92DU0mdX0Do9liz7/i16 vZQ4i1EAbunO3POmDr0kc9I40e4P7U/DBkGNWgnhH1K+8yC4S75AwZb9egNbVn5Ijk7H r5fyI1vU+b8XZ5Qd/pYFJ+V7OL3A1XYajVRaCdpd/CEf+U+R2lRDS/GDbLkzZWkoCxjM HAYg== 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:dkim-signature :arc-authentication-results; bh=gAxwZcFUA4YEfwJpO5UpoQStd0WAtd0jsfV9NDZAo7g=; b=dP+3x9KR8QIQ1yGX5dHCofJXRSPuRC8Jwq6hloH/6e111lZoh1nCAP7x8cxAifLMeb +cSk3IROt0T8HT+/gEDNsZdGbWtaYSMi8Ihm8WA6F74xeU7iYbU/kLEzlHiQsFURboF4 VMAjgoS8aowOnI6Cu312RsHcLePdXF7hCZ5xC1lYchp+BnsEojos1NfLAmBAcI2mDIES 91MLwbks3KR1GIhwJoL0807mYWeLUPxVc/5i6rMOGs1VsP1xvCj512u+wgRy5s1ArPo0 SBPBjpfK4/U5uRf67iKnaUr18FpPGFhLXUZ7VbMvu++jJFrVAhtivNT/YNh3x5UyI2eu 9/kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ScaXWmit; 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 m32-v6si20828829pld.438.2018.05.24.04.20.23; Thu, 24 May 2018 04:20: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; dkim=pass header.i=@kernel.org header.s=default header.b=ScaXWmit; 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 S1033101AbeEXLTr (ORCPT + 99 others); Thu, 24 May 2018 07:19:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:53728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967925AbeEXJwq (ORCPT ); Thu, 24 May 2018 05:52:46 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 C15FD20847; Thu, 24 May 2018 09:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155566; bh=4rYd5j+5ztVyVqfqVyvfr4/6iELkISqoMuEy4P1C0Ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ScaXWmitBGpmdhMrUj/gvZgHJZW71EjQHVVVQmwoPMA2xWKAxjcXdI1zlFNNodnrD iJ+O0N/FY4GNO8MrBLunOhUj+b4+RuHf4Sk2ppUFnqmLHhMpF0sYy0GSxPU2ofI6nr R25kgXbhC8MKyTDaC6+angysO37k6t9Bzik+UihY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mohammed Gamal , Stephen Hemminger , "David S. Miller" Subject: [PATCH 4.14 034/165] hv_netvsc: Fix net device attach on older Windows hosts Date: Thu, 24 May 2018 11:37:20 +0200 Message-Id: <20180524093623.353204390@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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: Mohammed Gamal [ Commit 55be9f25be1ca5bda75c39808fc77e42691bc07f upstream. ] On older windows hosts the net_device instance is returned to the caller of rndis_filter_device_add() without having the presence bit set first. This would cause any subsequent calls to network device operations (e.g. MTU change, channel change) to fail after the device is detached once, returning -ENODEV. Instead of returning the device instabce, we take the exit path where we call netif_device_attach() Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") Signed-off-by: Mohammed Gamal Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/hyperv/rndis_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1276,7 +1276,7 @@ struct netvsc_device *rndis_filter_devic rndis_device->link_state ? "down" : "up"); if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5) - return net_device; + goto out; rndis_filter_query_link_speed(rndis_device, net_device);