]> git.baikalelectronics.ru Git - kernel.git/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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Sep 2022 08:53:02 +0000 (09:53 +0100)
commit5546b2b813b04a1b5e9b8a301328115ca6f85599
tree165e6747dffa766401874c1361b148274313cdfd
parent30545d0a34d3c5e75b71f5b996ad84f730dd44ec
xen-netback: only remove 'hotplug-status' when the vif is actually destroyed

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: 760c50d0780d ("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>
drivers/net/xen-netback/xenbus.c