public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: FAILED: patch "[PATCH] vmbus: fix subchannel removal" failed to apply to 4.20-stable tree
Date: Mon, 28 Jan 2019 17:10:14 -0500	[thread overview]
Message-ID: <20190128221014.GO3973@sasha-vm> (raw)
In-Reply-To: <PU1P153MB0169AB52ED0A1FF3C1705DFBBF960@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM>

On Mon, Jan 28, 2019 at 06:43:16PM +0000, Dexuan Cui wrote:
>> From: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
>> Sent: Monday, January 28, 2019 4:35 AM
>> To: Dexuan Cui <decui@microsoft.com>; sashal@kernel.org; Stephen
>> Hemminger <sthemmin@microsoft.com>
>> 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 <stable@vger.kernel.org>.
>>
>> thanks,
>>
>> greg k-h
>>
>> ------------------ original commit in Linus's tree ------------------
>>
>> From b5679cebf780c6f1c2451a73bf1842a4409840e7 Mon Sep 17 00:00:00
>> 2001
>> From: Dexuan Cui <decui@microsoft.com>
>> 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 <sthemmin@microsoft.com>
>> Signed-off-by: Dexuan Cui <decui@microsoft.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>>
>> 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

      reply	other threads:[~2019-01-28 22:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 12:34 FAILED: patch "[PATCH] vmbus: fix subchannel removal" failed to apply to 4.20-stable tree gregkh
2019-01-28 18:43 ` Dexuan Cui
2019-01-28 22:10   ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190128221014.GO3973@sasha-vm \
    --to=sashal@kernel.org \
    --cc=decui@microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox