Commit cefbb0f2 authored by Paul Durrant's avatar Paul Durrant Committed by Jialin Zhang
Browse files

xen-netback: only remove 'hotplug-status' when the vif is actually destroyed

stable inclusion
from stable-v5.10.143
commit 0f1e7977e1f21f5ccd634ef00575ba10d8efc8a0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0f1e7977e1f21f5ccd634ef00575ba10d8efc8a0



--------------------------------

[ Upstream commit c55f34b6 ]

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: 0f4558ae ("Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"")
Signed-off-by: default avatarPaul Durrant <pdurrant@amazon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 7e829907
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment