Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1916420imm; Thu, 24 May 2018 02:53:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqSiPvWJxIiBoYO9MP/YgQPUVGsvqWgHVcRNgkcrQKXGYIhmCueiM+0WNEd8G3ZbGSx+6vO X-Received: by 2002:a65:438b:: with SMTP id m11-v6mr5094361pgp.99.1527155619629; Thu, 24 May 2018 02:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527155619; cv=none; d=google.com; s=arc-20160816; b=ohtS7dH6XuRgt8fOpVkwdJ4hFXyVsmf4mnbLyS5I/V8D6LvXMqxReA7rsdNCuefQTr RCsveGmKZZ55/kW07kTgyDe2Yd6dk+ZOwEqUQSI6/AHtatmZJAOZpgmaIm6I8sw/oXH/ vYdwiMnF0ncyYYXMFJSuhAlrcjS6VuY6RnlNAuTXnLcRbzedPlWy6xZAn9AtSszexo8f yxGwBNiYZ6sOGpi/vK/XjlOv+VOCiocqj7N1TCs7fVrlAzSbivQtBe/8bfqBUdHyaO+6 2ks8GuwNWdUJgfBmQACGez+omWF20SasYg77h7WxWFChlIjmx7OxSkgqBFndw3YVmuHJ V+gQ== 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=uk22E7jryFi2WrqfhW2WkhJVZB1TY+v/e7+Uwwkcg0M=; b=McSfkUHliWFoCSLNcO0Bk3fTh+YndeqW0i/Sp+C6XEQbwlMZFFDhF8xDzx5RxTUUIZ IPUMmsnv5GtmOO5/Z2/GcFTEo/FMCbkzwGMWU9SNGdIOjCEqg96ur3ufM+e7Wq+Lh1Do spt0DDLHD3/UiosOnXSUyD8iDMqzbOW0IWfDV2DF0IDV1THT11zsjMt61qNO7DQoIzjE 13DAo9tNmtNyLIJEb2N55NCfkkTXR7x2LIwkgwaUtD4n2IVu1FHAXCxb8P5Wn5mqLAEV yPemt5qPb3dz15n+286z/FAM3Qi4jveOtVSQ2Qyy0Pnue7GiZjpy8j2m7uRfz6xLWnEz KrtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=plDn0ROO; 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 j19-v6si19918777pll.518.2018.05.24.02.53.25; Thu, 24 May 2018 02:53:39 -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=plDn0ROO; 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 S967872AbeEXJw2 (ORCPT + 99 others); Thu, 24 May 2018 05:52:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:51046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967571AbeEXJwQ (ORCPT ); Thu, 24 May 2018 05:52:16 -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 B331620847; Thu, 24 May 2018 09:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155536; bh=wL4axBBLMjlDlLuYX29HS8E1r7l4SCGAOAaidcjkp2Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=plDn0ROOgZ7mvOHrPnNY+FnD+fFLlefvZySSV8gnzOeSaBDQUXau+Y5obpFG7tpRi W1FoN7sCVFZ4SkJB3iF7xiqJgCp9r1vdWyK0yUYl6QUCRBV6Nh/JqkgUEVx+28IVcA KFTcH9qw0Hxc1Lk31UD6S/pwNqfTQ44ubf86oSUo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haiyang Zhang , Stephen Hemminger , "David S. Miller" Subject: [PATCH 4.14 024/165] hv_netvsc: cancel subchannel setup before halting device Date: Thu, 24 May 2018 11:37:10 +0200 Message-Id: <20180524093622.958178798@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: Stephen Hemminger [ Commit a7483ec0267c69b34e818738da60b392623da94b upstream. ] Block setup of multiple channels earlier in the teardown process. This avoids possible races between halt and subchannel initialization. Suggested-by: Haiyang Zhang Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/hyperv/rndis_filter.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1340,6 +1340,9 @@ void rndis_filter_device_remove(struct h { struct rndis_device *rndis_dev = net_dev->extension; + /* Don't try and setup sub channels if about to halt */ + cancel_work_sync(&net_dev->subchan_work); + /* Halt and release the rndis device */ rndis_filter_halt_device(rndis_dev);