From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB66BC282C8 for ; Mon, 28 Jan 2019 12:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C04D21738 for ; Mon, 28 Jan 2019 12:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548678896; bh=AXrWaDo0+cH7DSETu9dSXgvnURZeUzZ2WEfoz57vxsQ=; h=Subject:To:Cc:From:Date:List-ID:From; b=sHE8D0EaOhzGUORQxYzk78VC2E40rnpj2BYM1Qe+Mgn98PwMsXpUyr3mqVGcRU90p Ar2QY6qzvupdBn/pLfDMLiw8H4UDmsDH17ZI7udgZqLWDFeD93TcOTsBFdtP7zCSHx WiNeqSM2cX4zW+B/ET67/2pQF0dPjd9lI4cUMc4Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbfA1Me4 (ORCPT ); Mon, 28 Jan 2019 07:34:56 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:51035 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbfA1Mez (ORCPT ); Mon, 28 Jan 2019 07:34:55 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 676048DD8; Mon, 28 Jan 2019 07:34:52 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 28 Jan 2019 07:34:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hukxQL Bwt+bbTEiYhJV0xmssNIS4mGNLnOuAwmcqZog=; b=EHLdS7/r+1eWjNTQyuPZAq 2RxLZI6bNtbUr2z92/1DAYo24uxzH0NYpWyV1Ne4vQquTv1XH7J+xPkDyvCEVEB4 hSLCS4mJZF06ZCYt37JNkr1QRprCte6qV7ux3gE9AoxlTEqfuHT6rcUf6yCUKp58 J7HurqccHyqnvi9kgZNBF+RgH3PGp20TgDffSK094YTAAZ1upslFhup5AktcEq+u tWntd3LMc86rvQjd73vDwZbnQx8FzwcW4DCspemBdUVrl8kv6zeXC/Jn7RugQKBg +1rKP+au+IwXbOy9LQg6E9iE4tiZCDUfUO872ClII+SVf3xAAFVVJPCguIaHW/tg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrjedtgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucgoufhprghmkfhpucdlfedttddmnecujfgurhepuffvhfffkfggtgfgsehtkeertd dttdflnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdho rhhgqeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 8B0E8E432B; Mon, 28 Jan 2019 07:34:51 -0500 (EST) Subject: FAILED: patch "[PATCH] vmbus: fix subchannel removal" failed to apply to 4.20-stable tree To: decui@microsoft.com, sashal@kernel.org, sthemmin@microsoft.com Cc: From: Date: Mon, 28 Jan 2019 13:34:50 +0100 Message-ID: <1548678890178139@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.20-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From b5679cebf780c6f1c2451a73bf1842a4409840e7 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 9 Jan 2019 20:56:06 +0000 Subject: [PATCH] vmbus: fix subchannel removal The changes to split ring allocation from open/close, broke the cleanup of subchannels. This resulted in problems using uio on network devices because the subchannel was left behind when the network device was unbound. The cause was in the disconnect logic which used list splice to move the subchannel list into a local variable. This won't work because the subchannel list is needed later during the process of the rescind messages (relid2channel). The fix is to just leave the subchannel list in place which is what the original code did. The list is cleaned up later when the host rescind is processed. Without the fix, we have a lot of "hang" issues in netvsc when we try to change the NIC's MTU, set the number of channels, etc. Fixes: ae6935ed7d42 ("vmbus: split ring buffer allocation from open") Cc: stable@vger.kernel.org Signed-off-by: Stephen Hemminger Signed-off-by: Dexuan Cui Signed-off-by: Sasha Levin diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index ce0ba2062723..bea4c9850247 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -701,19 +701,12 @@ static int vmbus_close_internal(struct vmbus_channel *channel) int vmbus_disconnect_ring(struct vmbus_channel *channel) { struct vmbus_channel *cur_channel, *tmp; - unsigned long flags; - LIST_HEAD(list); int ret; if (channel->primary_channel != NULL) return -EINVAL; - /* Snapshot the list of subchannels */ - spin_lock_irqsave(&channel->lock, flags); - list_splice_init(&channel->sc_list, &list); - spin_unlock_irqrestore(&channel->lock, flags); - - list_for_each_entry_safe(cur_channel, tmp, &list, sc_list) { + list_for_each_entry_safe(cur_channel, tmp, &channel->sc_list, sc_list) { if (cur_channel->rescind) wait_for_completion(&cur_channel->rescind_event);