[Devel] [PATCH] venet: do not destroy VE IP on shutdown hook if NFS is allowed
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu Oct 5 20:32:30 MSK 2017
Mounts are destroyed asynchroniously and thus can race with VE IP destruction
leading to dead lock in kernel: NFS can'n be unmounted.
Fix it by skipping VE IP desctruction, is NFS feature is enabled in the
container.
https://jira.sw.ru/browse/PSBM-73614
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
drivers/net/venetdev.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index 5710792..7a546cc 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -744,10 +744,8 @@ static void venet_setup(struct net_device *dev)
SET_ETHTOOL_OPS(dev, &venet_ethtool_ops);
}
-static void veip_shutdown(void *data)
+static void veip_shutdown(struct ve_struct *ve)
{
- struct ve_struct *ve = data;
-
spin_lock(&veip_lock);
if (ve->veip) {
__venet_ext_clean(ve);
@@ -1178,8 +1176,18 @@ static struct rtnl_link_ops venet_link_ops = {
.maxtype = VENET_INFO_MAX,
};
+static void veip_shutdown_fini(void *data)
+{
+ struct ve_struct *ve = data;
+
+ if (ve->features & VE_FEATURE_NFS)
+ return;
+
+ veip_shutdown(ve);
+}
+
static struct ve_hook veip_shutdown_hook = {
- .fini = veip_shutdown,
+ .fini = veip_shutdown_fini,
.priority = HOOK_PRIO_FINISHING,
.owner = THIS_MODULE,
};
More information about the Devel
mailing list