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=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 B8CCDC282CD for ; Mon, 28 Jan 2019 22:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 820FC2177E for ; Mon, 28 Jan 2019 22:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548713417; bh=S0o/0vj1VFmBjVbsuNthRay2b1qW5/t/5XbVINWtBfE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Ysk6y1bno4ztLg/Q4EMa9h2UBVzLdk6O8s3e4avquzk7j59JNGDFvnPRFfScRZAhY YKuYaEpinSiDgvQlYgyiNM24UCp9o/WzZPTF6UYHeWURsoWlABKT+X/nwlp7/U0ic4 tmJmPd/fFEFbBeY1xh1g6neAxifOQCRolAvV/cIk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726790AbfA1WKQ (ORCPT ); Mon, 28 Jan 2019 17:10:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:47904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbfA1WKQ (ORCPT ); Mon, 28 Jan 2019 17:10:16 -0500 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 88D2F2175B; Mon, 28 Jan 2019 22:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548713415; bh=S0o/0vj1VFmBjVbsuNthRay2b1qW5/t/5XbVINWtBfE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Cc4O+NjVFy1FfY/qN3feEs3ULNNV+4xEUo37BPXi+0WN5i2hFgjc0rePdTfJuyRZP 48pn6SH+smRr144ePEeSp/1vRtUih99sD6nKykBB9H77y7ntqbVKy7VoGHl1HrjKDw lRSU3c4w2K4/prIUSgCkobUFNa5Wan2/HMz1pFTs= Date: Mon, 28 Jan 2019 17:10:14 -0500 From: Sasha Levin To: Dexuan Cui Cc: "gregkh@linuxfoundation.org" , Stephen Hemminger , "stable@vger.kernel.org" Subject: Re: FAILED: patch "[PATCH] vmbus: fix subchannel removal" failed to apply to 4.20-stable tree Message-ID: <20190128221014.GO3973@sasha-vm> References: <1548678890178139@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Jan 28, 2019 at 06:43:16PM +0000, Dexuan Cui wrote: >> From: gregkh@linuxfoundation.org >> Sent: Monday, January 28, 2019 4:35 AM >> To: Dexuan Cui ; sashal@kernel.org; Stephen >> Hemminger >> Cc: stable@vger.kernel.org >> Subject: FAILED: patch "[PATCH] vmbus: fix subchannel removal" failed to apply >> to 4.20-stable tree >> >> >> 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); >> > >Hi Sasha, Greg, >We need to backport this patch to linux-4.20.y. To cleanly cherry-pick >this patch (i.e. b5679cebf780 ("vmbus: fix subchannel removal")), we >need to backport another patch first: > >4d3c5c69191f ("Drivers: hv: vmbus: Remove the useless API vmbus_get_outgoing_channel()") > >Unluckily we can't cleanly git-cherry-pick 4d3c5c69191f, as a trivial rebase >is required. I attached the rebased version, and let me also paste the patch >below for your convenience. I've queued your backport of 4d3c5c69191f and b5679cebf780 on top of it for 4.20, thank you. -- Thanks, Sasha