]> www.infradead.org Git - users/dwmw2/linux.git/commit
vmbus: fix subchannel removal
authorDexuan Cui <decui@microsoft.com>
Wed, 9 Jan 2019 20:56:06 +0000 (20:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:15:45 +0000 (08:15 +0100)
commit601cdaedd2ab8c9f635d1164c0fb52a086b25b8f
treefda628b447f19fb7cdee3b4ff64774e49f60f16f
parente4266dff05a0803ab0ea3952866a8734e9905739
vmbus: fix subchannel removal

[ Upstream commit b5679cebf780c6f1c2451a73bf1842a4409840e7 ]

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>
drivers/hv/channel.c