]> git.itanic.dy.fi Git - linux-stable/commit
xen-netback: only remove 'hotplug-status' when the vif is actually destroyed
authorPaul Durrant <pdurrant@amazon.com>
Thu, 1 Sep 2022 11:55:54 +0000 (12:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:30:05 +0000 (11:30 +0200)
commit595e3616f8e0be5d6ef3f70e9966191c091ef691
tree5965827e93e19f7cd79338bf0af156e5bd8b6d34
parentc3efe896f13b83b227d8a4637c81e108d1a6795f
xen-netback: only remove 'hotplug-status' when the vif is actually destroyed

[ Upstream commit c55f34b6aec2a8cb47eadaffea773e83bf85de91 ]

Removing 'hotplug-status' in backend_disconnected() means that it will be
removed even in the case that the frontend unilaterally disconnects (which
it is free to do at any time). The consequence of this is that, when the
frontend attempts to re-connect, the backend gets stuck in 'InitWait'
rather than moving straight to 'Connected' (which it can do because the
hotplug script has already run).
Instead, the 'hotplug-status' mode should be removed in netback_remove()
i.e. when the vif really is going away.

Fixes: 0f4558ae9187 ("Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"")
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/xen-netback/xenbus.c