]> git.baikalelectronics.ru Git - kernel.git/commit
vmbus: fix subchannel removal
authorDexuan Cui <decui@microsoft.com>
Wed, 9 Jan 2019 20:56:06 +0000 (20:56 +0000)
committerSasha Levin <sashal@kernel.org>
Thu, 10 Jan 2019 00:20:31 +0000 (19:20 -0500)
commita80ff5ed1521cc0ad295e2df2541b14902295f73
treefed658df6cfe4158f765488832ebf189d6bcda2a
parente03e412239e3913614fa690f72209fbae409027f
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: f4f2840217da ("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