[Devel] [PATCH RHEL7 COMMIT] venet: free netdevice in destructor
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jul 25 17:36:13 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.16
------>
commit 0bf28b93c2c62362b8eed0ca59e73d6e246ed579
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date: Tue Jul 25 18:36:12 2017 +0400
venet: free netdevice in destructor
This looks like an old typo. Or netdevice logic has changed.
Anyway, netdevice destructor has to call for free_netdev().
Note: there was some strange logic piece, which was exiting destructor
routine, if dev->ml_priv is NULL.
This is an obvious flaw (because the device has to be freed anyways)
Found in the scope of https://jira.sw.ru/browse/PSBM-65033
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
drivers/net/venetdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index 4954129..5ac62c5 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -466,6 +466,8 @@ static void venet_destructor(struct net_device *dev)
if (venet_free_stat)
venet_free_stat(dev->nd_net->owner_ve);
+
+ free_netdev(dev);
}
/*
More information about the Devel
mailing list